CSS3教程

当前位置: HTML5技术网 > CSS3教程 > 纯css3有序列表

纯css3有序列表

这个前面的数字其实和ol的decimal是没有关系的。其实应用的是:before和counter-increment来生成的。而中间的那个空白的间隔其实是border。其余的一些就是圆角,动画什么的。了解了原理,实践操作下吧。


CSS

.rounded-list a{
position: relative;
display: block;
padding: .4em .4em .4em 2em;
*padding: .4em;
margin: .5em 0;
background: #ddd;
color: #444;
text-decoration: none;
-moz-border-radius: .3em;
-webkit-border-radius: .3em;
border-radius: .3em;
-webkit-transition: all .3s ease-out;
-moz-transition: all .3s ease-out;
-ms-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
transition: all .3s ease-out;
}
.rounded-list a:hover{
background: #eee;
}
.rounded-list a:hover:before{
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
.rounded-list a:before{
content: counter(li);
counter-increment: li;
position: absolute;
left: -1.3em;
top: 50%;
margin-top: -1.3em;
background: #87ceeb;
height: 2em;
width: 2em;
line-height: 2em;
border: .3em solid #fff;
text-align: center;
font-weight: bold;
-moz-border-radius: 2em;
-webkit-border-radius: 2em;
border-radius: 2em;
-webkit-transition: all .3s ease-out;
-moz-transition: all .3s ease-out;
-ms-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
transition: all .3s ease-out;
}


演示:http://www.w3cplus.com/demo/css3/listnews/index.html
下载:listnews.zip

【纯css3有序列表】相关文章

1. 纯css3有序列表

2. CSS3制作购物车下拉列表

3. CSS3创意动画列表项添加、删除效果

4. 整理 W3CSchool 常用的CSS属性列表

5. [视频]纯CSS3腾讯QQ企鹅(附绘制过程)

6. 用纯CSS3实现图片幻灯片切换效果

7. 纯CSS3实现圆角按钮

8. 效果非常酷!纯CSS3实现的图片滑块程序

9. 超可爱 纯CSS3实现的小猪、小老鼠、小牛

10. 纯CSS3实现的顶部社会化分享按钮

本文来源:https://www.51html5.com/a918.html

点击展开全部
上一篇:CSS3 Admin Menu 下一篇:CSS基线之道

﹝纯css3有序列表﹞相关内容

其它栏目

也许您还喜欢