Asp,Php,Jssdk,mysql,mssql,微信公众号开发,小程序开发-学习笔记 收集日常学习笔记和重点,交流QQ:79657181,手机/微信:18611436777

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

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

2018年5月3日 | 发布:anco | 分类:css | 评论:0

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;}

2018年5月3日 | 发布:anco | 分类:css | 评论:0

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

<style>

.txt{

    width:200px;

    border:1px solid #ddd;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

}

</style>

2018年4月25日 | 发布:anco | 分类:css | 评论:0

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;}

2018年4月16日 | 发布:anco | 分类:css | 评论:0

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;}

2018年3月23日 | 发布:anco | 分类:css | 评论:0