12
2018
05

Box Shadow(阴影)-Css3背景阴影效果

http://www.css88.com/tool/css3Preview/Box-Shadow.html


带阴影效果,可以调透明度

-moz-box-shadow:0px 0px 15px rgba(0, 0, 0, 0.3); -webkit-box-shadow:0px 0px 15px rgba(0, 0, 0, 0.3); box-shadow:0px 0px 15px rgba(0, 0, 0, 0.3);

10
2018
05

css图片背景百分百显示出来

background:#4790fd url(../images/ifoot.jpg) no-repeat; background-size:100%;

03
2018
05

【CSS】单行图片与文字垂直居中

单行图片与文字垂直居中核心关键,是在img标签中的style属性加入vertical-align:middle;样式

03
2018
05

css自动省略字多的标题

/*首页新闻自动省略字多的标题start*/

.syl_list {width:260px;}

.syl_list ul li{height:30px; line-height:30px; font-size:14px;}

.syl_list ul li+li{border-top:1px dashed #614d46;}

.syl_list ul li a{color:#e8892d; background: url(../images/index_icon4.jpg) 3px center no-repeat; padding-left:20px; display:block; overflow:hidden; white-space:nowrap; -ms-text-overflow:ellipsis; text-overflow:ellipsis;}

25
2018
04

css实现隐藏多余溢出文字并显示省略号

<style>

.txt{

    width:200px;

    border:1px solid #ddd;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

}

</style>

16
2018
04

css当前页面效果

/*关于我们*/

.x_about{ width:1148px; min-width:1148px; margin:0px auto; border:1px solid #CCC; background:#ffb000; overflow:hidden}

.x_about .box1{ float:left; width:960px; padding:15px; height:auto; background:#FFF; border-right:1px solid #CCC; min-height:300px;}

09
2018
04

css中给ul>li加背景并且固定位置,就是文字前的小原点

.tabBox .bd li a{color:#333333; border-bottom:1px dotted #999999; padding-left:20px; display:block; background:url(../images/jt.jpg) no-repeat left center }

04
2018
04

css中背景background颜色,背景图,重复,居中,居上集中写法

background:#FFF url(../images/body.jpg) no-repeat center top;

01
2018
04

解决IE8下CSS3选择器 :nth-child() 不兼容的问题

1.定义和用法

:nth-child(n) 选择器匹配属于其父元素的第 N 个子元素,不论元素的类型。 
n 可以是数字、关键词或公式。

23
2018
03

css背景悬停在当前页面的js

css背景悬停在当前页面的js

.zj_menu{ height: 160px; overflow: hidden;}

.zj_menu ul li{ float: left; width:300px; text-align: center;}

.zj_menu ul li a{ display:block; height: 50px; line-height: 50px; font-size: 20px; color: #333;background:url(../images/zj_li.gif) repeat-x; border-right: 1px solid #ded8cd;}