:before :after
#p1:before{
content: "哈哈哈 ";
color: red;
}
#p1:after{
content: "哈哈哈";
color: #452dff;
}
content: url('img.jpg');
content: attr(href);
content: " (" attr(href) ")"
太极图
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
#p1:before{
content: "哈哈哈 ";
color: red;
} #p1:after{
content: "哈哈哈";
color: #452dff;
} #a1:after{
content: attr(href);
} #yin-yang {
width: 96px;
height: 48px;
background: #eee;
border-color: red;
border-style: solid;
border-width: 2px 2px 50px 2px;
border-radius: 100%;
position: relative;
} #yin-yang:before {
content: "";
position: absolute;
top: 50%;
left:;
background: #eee;
border: 18px solid red;
border-radius: 100%;
width: 12px;
height: 12px;
} #yin-yang:after {
content: "";
position: absolute;
top: 50%;
left: 50%;
background: red;
border: 18px solid #eee;
border-radius:100%;
width: 12px;
height: 12px;
}
</style>
</head>
<body>
<p id="p1">我是一个兵 </p>
<a id="a1" href="https://www.baidu.com">百度</a>
<br>
<div id="yin-yang"></div>
</body>
</html>
分割线
.mask { overflow: hidden; height: 20px; }
.mask:after { content: ''; display: block; margin: -25px auto 0; width: 100%; height: 25px; border-radius: 125px/12px; box-shadow: 0 0 8px black; }
随机推荐
- Linux 关机
1. shutdown shutdown -h now 立刻关机 shutdown -h 22:50 22:50 分的时候关机 shutdown -h +10 10分钟后关机 shutdwon -r ...
- Android Material Design 之 Toolbar的使用
Material Design是谷歌提出来的最新ui设计规范,我想actionbar大家也许并不陌生,toolbar简单而言可以看做为actionbar的升级版,相比较actionbar而言,tool ...
- VS2012生成绿色版程序的方法
方法就是在工程属性里设置: 配置属性-〉常规-〉项目默认值-〉MFC的使用-〉在静态库中使用MFC,见下图 之后重新编译即可.
- HDU 4416 Good Article Good sentence(后缀自动机)
[题目链接] http://acm.hdu.edu.cn/showproblem.php?pid=4416 [题目大意] 给出一个字符串,然后,给出一个字符串集合,问在该字符串中出现,且不在字符串集合 ...
- SQL Server 动态行转列(轉載)
一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 实现代码(SQL Codes) 方法一:使用拼接SQL,静态列字段; 方法二:使用拼接SQL, ...
- OC中使用 static 、 extern、 const使用
static static用于定义静态变量,静态变量只会被初始化一次,并且直到程序销毁时才会释放 static NSString *str = @"asdfa"; const co ...
- VS2012 内容存储区指定的位置无效或者您无权访错误
——解决由于移动过microsoft help viwer( msdn )数据目录,又误删除数据目录后,引发其不能启动问题 1.使用命令行下载microsoft help viwer( msdn )数 ...
- [Swust OJ 385]--自动写诗
题目链接:http://acm.swust.edu.cn/problem/0385/ Time limit(ms): 5000 Memory limit(kb): 65535 Descripti ...
- css中z-index属性(标签层叠次序)
定义和用法 z-index 属性设置元素的堆叠顺序.拥有更高堆叠顺序的元素总是会处于堆叠顺序较低的元素的前面. 注释:元素可拥有负的 z-index 属性值. 注释:Z-index 仅能在定位元素上奏 ...
- SQL中 and or优先级问题
资源来源:http://www.linuxidc.com/Linux/2012-03/56267.htm 刚刚在项目中遇到这样一个问题,SQL语句如下: select * from LOAN_BACK ...