css
boys1999
这个作者很懒,什么都没留下…
展开
-
div 水平居中
.outbox {width:auto; height:500px; overflow:hidden; text-align:center; background:#000; }.divc {float:auto;float:auto; width:500px; height:100px; background:#505050; } 要点:父div中写:tex原创 2014-12-14 18:47:02 · 365 阅读 · 0 评论 -
css 制线条选项卡 选中状态
/* 1.外框显示底边框 2.选项卡显示四边边框 3.选中选项卡底边框变色达到选中效果*/.hd{width:800px; height:40px; border-bottom:solid 1px #00ff00; }.tit{ width:100px; border-bottom: 1px solid #ff0000; color: #666; line-height:40p原创 2015-02-03 14:23:12 · 1338 阅读 · 0 评论 -
css 自适应宽度
.box {border:solid #ff0000 1px;}sdfsdfsdfsdfsdfsdf会发现整个box的边框占满父容器,这时只要加一个:float:left;就可以达到文字多少边框就显示多少原创 2015-02-03 16:16:03 · 443 阅读 · 0 评论 -
css 让div垂直水平居中,兼容ie6+
body { font-size:12px;font-family:tahoma;} #wrap { background-color:#FFCCFF; width:760px; height:400px; display:table; /*垂直居中因素*/ _position:relative; /*垂直居中因素*/ } #subwrap { text-align:cente转载 2015-03-17 22:53:57 · 3114 阅读 · 0 评论 -
less css 用js 运行时解析编译成css
var strCss=$("#txt").val();//less代码 var p=new(less.Parser)();//声明 //开始解析 p.parse( strCss,function(err,t){ if(err){ alert(error(err)); } alert( t.toCSS() ); })原创 2015-03-18 21:59:46 · 632 阅读 · 0 评论 -
ios系统和某些移动端background-attachment:fixed不兼容性
ios系统和某些移动端background-attachment:fixed不兼容性,没有任何效果,但可以hack一下就可以了,代码如下:ps:想在哪个标签加背景,可以在它class后:before.body:before { content: ' '; position: fixed; z-index: -1; top: 0; right: 0; bottom转载 2015-12-12 09:56:58 · 9651 阅读 · 2 评论