小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

偽元素before與after

 融水公子 2018-09-09
源代碼:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>偽元素before與after</title>
<style>
h2:before{/*after也可以*/
content: "刺猬";
color: #ff0d20;
padding: 0px 10px 0px 10px;/*左右*/
margin-right: 10px;
}
h2.nocontent:before{/*h4不插入*/
content: none;
}
</style>
</head>
<body>
<h1>(h1)偽元素before與after</h1>
<h2>(h2)致敬偶像最好方式就是擊敗她 20歲大阪直美做到了</h2>
<h2>(h2)致敬偶像最好方式就是擊敗她 20歲大阪直美做到了</h2>
<h2 class="nocontent">(h2)致敬偶像最好方式就是擊敗她 20歲大阪直美做到了</h2>
<h2>(h2)致敬偶像最好方式就是擊敗她 20歲大阪直美做到了</h2>
<h2>(h2)致敬偶像最好方式就是擊敗她 20歲大阪直美做到了</h2>
<h2>(h2)致敬偶像最好方式就是擊敗她 20歲大阪直美做到了</h2>
</body>
</html>
結果:

插入圖片示例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>插入圖片before</title>
<style type="text/css">
h2:before{
content: url(mm.png);
}
</style>
</head>
<body>
<h1>插入圖片before</h1>
<h2>插入圖片文件</h2>
<h2>插入圖片文件</h2>
<h2>插入圖片文件</h2>
<h2>插入圖片文件</h2>
<h2>插入圖片文件</h2>
<h2>插入圖片文件</h2>
</body>
</html>
結果: 
實例二:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>插入圖片before</title>
<style type="text/css">
/* h2:before{
content: url(mm.png);
}*/
h2.m1:after{
content: url("m1.png");
}
h2.m2:after{
content: url("m2.png");
}
</style>
</head>
<body>
<h1>插入圖片before</h1>
<h2 class="m1">插入圖片文件</h2>
<h2 class="m2">插入圖片文件</h2>
<h2 class="m1">插入圖片文件</h2>
<h2 class="m1">插入圖片文件</h2>
<h2>插入圖片文件</h2>
<h2>插入圖片文件</h2>
</body>
</html>
 
 分享知識,分享快樂!希望中國站在編程之巔!

               ----

公眾微信號:rsgz520

360圖書館館號:rsgz002.360doc.com

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內容均由用戶發(fā)布,不代表本站觀點。請注意甄別內容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內容,請點擊一鍵舉報。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多