A 使用选择器来插入内容

h2:before{

  content:"前缀";

}

h2:after{

  content:"后缀";

}

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

h2.sample:before{

  content:none;

}

2. 插入图像

A 在标题前插入图像文件

h2: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 字符串两边添加文字嵌套符号

h3:before{

  content: open-quote;

}

h3:after{

  content: close-quote;

}

h3{

  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在页面中插入内容的更多相关文章

  1. CSS3 动态生成内容(在Web中插入内容)====CSS的伪类或者伪元素

    # css3 .类:伪类::伪元素 /* CSS3伪元素/伪类 :https://www.w3.org/TR/css3-selectors/#selectors ::selection 伪元素(F12 ...

  2. 向ueditor中插入内容

    html在ueditor中插入内容不能直接插入,必须判断编辑器是否创建成功,jsp可以用java代码嵌套的方式. html页面中:<textarea id="zym" nam ...

  3. Android : 如何在WebView显示的页面中查找内容

    Android : 如何在WebView显示的页面中查找内容 Author : Aoyousatuo Zhao http://blog.sina.com.cn/aoyousatuo WebView是A ...

  4. VSTO 向office文档中插入内容

    原文:VSTO 向office文档中插入内容 Word: Word.Selection sec = ThisAddIn.appWord.Selection;            sec.Insert ...

  5. JSP 页面中插入图片

    第一步 在 JSP 页面中插入图片 EL 表达式 ${pageContext.request.contextPath } 的值为当前的项目名称 <html> ... <body> ...

  6. 如需在 HTML 页面中插入 JavaScript,请使用 <script> 标签。

    如需在 HTML 页面中插入 JavaScript,请使用 <script> 标签. <script> 和 </script> 会告诉 JavaScript 在何处 ...

  7. html页面中插入html的标签,JS控制标签属性

    html页面中插入html的标签 方法1: 使用标签: <textara> </textara>标签 方法2: 使用JS: document.getElementById(&q ...

  8. sprytabbedpanels.js库之在页面中插入Tabbed Panels

    向页面加入sprytabbedpanels.js文件.<script src="SpryAssets/SpryTabbedPanels.js" type="text ...

  9. 纸壳CMS(ZKEACMS)体验升级,快速创建页面,直接在页面中修改内容

    关于纸壳CMS 纸壳CMS又名 ZKEACMS Core 是ZKEACMS的 .net core 版本,可运行在 .net core 1.1 平台上.是一个开源的CMS. 纸壳CMS对于 ZKEACM ...

随机推荐

  1. 使用hexo+coding搭建免费个人博客

    1.检测node和npm 先检测一下有没有node.js和npm $ node -v //如果有,说明node.js安装成功! $ node -v v8.4.0 //如果有,说明npm安装成功! $n ...

  2. Bootstrap-datepicker日期时间选择器的简单使用

    日期时间选择器 目前,bootstrap有两种日历.datepicker和datetimepicker,后者是前者的拓展. Bootstrap日期和时间组件: 使用示例: 从左到右依次是十年视图.年视 ...

  3. slatstack高效运维

    一.简介 saltstack是由thomas Hatch于2011年创建的一个开源项目,设计初衷是为了实现一个快速的远程执行系统. 二.诞生的背景 系统管理员日常会进行大量的重复性操作,例如安装软件, ...

  4. mono for android生成APK出现错误fatal error in gc 解决方案

    laxknight 标签: mono for android,fatal error in gc mono for android生成APK出现这个错误fatal error in gc collec ...

  5. 开源一个Java Class实现Openfire登陆、推出、消息发送,方便其他系统集成IM功能了

    开源一个Java Class实现Openfire登陆.推出.消息发送 N年前写的,希望对Openfire开发新手有帮助哦 import java.util.*; import java.io.*;   ...

  6. Android进程管理

    1.进程按照优先级分为不同的等级FVSBE Foreground process前台进程:用户可看到进程里某个activity界面(可以获得焦点的) Visible process可见进程:用户仍可见 ...

  7. springboot+zuul(二)------智能负载

    一.参考 参考资料:https://www.cnblogs.com/flying607/p/8330551.html ribbon+spring retry重试策略源码分析:https://blog. ...

  8. sourceTree git 空目录从远程仓库克隆代码出现warning: templates not found

    解决办法: 在安装git时没有默认安装到c盘,而是安装到了d盘.在使用SourceTree进行代码克隆时提示warning: templates not found in D:\software\de ...

  9. 去掉img标签周围的空白

    我们在页面布局的时候,明明已经去掉了所有标签的margin和padding,img标签周围依然会有空白,解决方法有以下几种: 1.给img标签设浮动: img{ float:left; } 2.将im ...

  10. JVM垃圾回收机制总结

    对于垃圾回收机制我先抛出三个问题: ①哪些内存需要回收? ②什么时候回收? ③如何回收? 下面我们主要针对这三个问题来研究JVM GC 一.哪些内存需要回收? 1.JAVA使用可达性分析法来判断对象是 ...