這篇文章主要講解了“css3怎么在頁面中插入內(nèi)容”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“css3怎么在頁面中插入內(nèi)容”吧!
專注于為中小企業(yè)提供成都網(wǎng)站設(shè)計(jì)、網(wǎng)站制作服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)寧武免費(fèi)做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動了上1000+企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網(wǎng)站建設(shè)實(shí)現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。
A.使用選擇器來插入內(nèi)容
h3:before{
content:"前綴";
}
h3:after{
content:"后綴";
}
B.指定個(gè)別的元素不進(jìn)行插入
h3.sample:before{
content:none;
}
2. 插入圖像
A.在標(biāo)題前插入圖像文件
h3:before{
content:url(anwy.jpg);
}
B.將alt屬性的值作為圖像的標(biāo)題來顯示(用不了)
img:after{
content:attr(alt);
display:block;
text-align:center;
margin-top:5px;
font-size:11px;
font-weight:bold;
color:black;
}
3. 插入編號
A.多個(gè)標(biāo)題前加入連續(xù)編號
div:before{
content:counter(divCounter);
}
div{
counter-increment:divCounter;
}
B.在項(xiàng)目符號中追加文字
div:before{
content:"第"counter(divCounter)"段";
}
C.指定編號樣式、種類
div:before{
content:counter(divCounter,upper-alpha)'.';
color:blue;
font-size:16px;
}
D.編號嵌套
div:before{
content:counter(divCounter,upper-alpha)'.';
color:blue;
font-size:16px;
}
div{
counter-increment:divCounter;
counter-reset:subDivCounter;
}
p:before{
content:counter(subDivCounter)'.';
margin-left:15px;
font-size:12px;
}
p{
counter-increment:subDivCounter;
}
E.字符串兩邊添加文字嵌套符號
h4:before{
content: open-quote;
}
h4:after{
content: close-quote;
}
h4{
quotes:"【""】";
}
disc 點(diǎn)| circle圓圈 | square正方形 | decimal數(shù)字 | decimal-leading-zero 十進(jìn)制數(shù)| lower-roman 小寫羅馬文字| upper-roman 大寫羅馬文字| lower-greek小寫希臘字母 | lower-latin小寫拉丁文 | upper-latin 大寫拉丁文| armenian亞美尼亞數(shù)字 | georgian喬治亞數(shù)字 | lower-alpha小寫英文字母 | upper-alpha大寫英文字母 | none無 | inherit繼承
感謝各位的閱讀,以上就是“css3怎么在頁面中插入內(nèi)容”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對css3怎么在頁面中插入內(nèi)容這一問題有了更深刻的體會,具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識點(diǎn)的文章,歡迎關(guān)注!
分享名稱:css3怎么在頁面中插入內(nèi)容
網(wǎng)站網(wǎng)址:http://muchs.cn/article46/pidhhg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供響應(yīng)式網(wǎng)站、網(wǎng)頁設(shè)計(jì)公司、移動網(wǎng)站建設(shè)、域名注冊、網(wǎng)站導(dǎo)航、外貿(mào)網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)