CSS 僞類用於向某些選擇器添加特殊的效果。css
CSS 僞元素用於向某些選擇器添加特殊元素。html
新建一個html文件,代碼內容以下:ajax
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Pseudo Class And Pseudo Element</title> <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.css" rel="stylesheet"> <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.13.0/css/fontawesome.css" rel="stylesheet"> <style type="text/css"> a:link{ color:#00F; } a:visited{ color:black; } a:hover{ color:yellow; } a:active{ color:red; } tr td:nth-child(1):before{ content:"你的名字:"; color:red; } tr td:nth-child(3):before{ content:url(http://doc.exesoft.cn/pic/phone.png); display:inline-block; width:23px; height:23px; position:relative; left:-10px; top:5px; } </style> </head> <body> <div class="container"> <h2><a href="http://www.cnblogs.com/exesoft">僞類及僞元素演示</a></h2> <table class="table table-bordered"> <tr> <td>Name</td> <td>Age</td> <td>Phone</td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </div> </body> </html>
用瀏覽器預覽上方的代碼文件。bootstrap
1.看懂上面代碼,瀏覽器
2.複製到到自定義html文件中,進行預覽測試。測試
3.用手機抓頁面預覽動態演示視頻,最後把視頻傳至個人郵箱:ma@exesoft.cnurl
郵件名稱相似: 2018電商1班-18-張三-5-9-網頁做業,紅字要符合本身.spa
另外:.net
所用的phone.png圖標素材下載地址: http://doc.exesoft.cn/pic/phone.pngcode