随笔分类 - html/css
摘要:前一阵子写demo的时候遇到这样一个问题,就是给元素添加css3或者jquery动画时,在动画结束前不能准确取到元素的css属性。1. css3动画讨论先看代码:html:changegetcss:#hehe { width: 100px; height: 100px; padding: 10px; background: red; -webkit-transition: all 10s ease-out; -moz-transition: all 10s ease-out; -o-transition: all 10s ease-out; tr...
阅读全文
摘要:让背景透明,听上去不是挺容易的么?让背景色透明,很容易想到opacity,要兼容IE的话只要加上filter:alpha(opacity=?)就行了,OK,看看这个例子。html: 电话: css:html, body { margin: 0; padding: 0;}body { background: url('荷花.jpg') no-repeat;}.main { width: 300px; height: 100px; padding: 20px; color: #fff; opacit...
阅读全文