css3怎么在页面中插入内容

这篇文章主要讲解了“css3怎么在页面中插入内容”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“css3怎么在页面中插入内容”吧!

专注于为中小企业提供成都网站设计、网站制作服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业宁武免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了上1000+企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。

A.使用选择器来插入内容

h3:before{

content:"前缀";

}

h3:after{

content:"后缀";

}

B.指定个别的元素不进行插入

h3.sample:before{

content:none;

}

2. 插入图像

A.在标题前插入图像文件

h3:before{

content:url(anwy.jpg);

}

B.将alt属性的值作为图像的标题来显示(用不了)

img:after{

content:attr(alt);

display:block;

text-align:center;

margin-top:5px;

font-size:11px;

font-weight:bold;

color:black;

}

3. 插入编号

A.多个标题前加入连续编号

div:before{

content:counter(divCounter);

}

div{

counter-increment:divCounter;

}

B.在项目符号中追加文字

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  点| circle圆圈 | square正方形 | decimal数字 | decimal-leading-zero 十进制数|  lower-roman 小写罗马文字| upper-roman 大写罗马文字| lower-greek小写希腊字母 |  lower-latin小写拉丁文 | upper-latin 大写拉丁文| armenian亚美尼亚数字 | georgian乔治亚数字 |  lower-alpha小写英文字母 | upper-alpha大写英文字母 | none无 | inherit继承

感谢各位的阅读,以上就是“css3怎么在页面中插入内容”的内容了,经过本文的学习后,相信大家对css3怎么在页面中插入内容这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!

分享名称:css3怎么在页面中插入内容
网站网址:https://www.cdcxhl.com/article46/pidhhg.html

成都网站建设公司_创新互联,为您提供响应式网站网页设计公司移动网站建设域名注册网站导航外贸网站建设

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

商城网站建设