标签:top 块级元素 解决 技术 .com css round 搜索框 hive
1.设置背景图片要设置高度才能显示;
2.css中的font里面是不带color属性的,需要自己再添加color属性;
3.font属性 font-weight加粗
4.原来cellspcing和cellpadding不是css,是标签属性,所以不能写在css里面;
5.让字显示在图片上面的2种方法:1.图片设置成背景图片;2.使用position和z-index
参考:http://www.cnblogs.com/mingmingruyuedlut/archive/2013/01/11/2855721.html
6.字对齐:text-align;
7.使用到了<span>和<a>标签,发现在样式里面直接写margin-top、margin-bottom和padding-top、padding-bottom
都不起作用,页面样式的东西懂得不多,搜索一番,发现是因为<span>和<a>都不是块级元素,所以这几个属性都无效。
解决办法:在样式 中加入display:block;即可解决问题
span是内敛标签,所以只有左右有效,高度宽度上下margin都无效
8.span标签要设置高宽 要赢display:block;
9.如何设置一条竖线
<div clss="l"></div>
.l{
width: 1px;
height: 你需要的长度;
background: #000;
}
10.行高等于高就相当于垂直居中;
11.想移动背景图片可以参考精灵图(雪碧图)的方法;
12.制作一个搜索框
1 <div class="biankuang"><input type="text " class="same set_input"><button type="submit " class="same set_button" >搜索</button></div> 2 3 .same{ 4 box-sizing: border-box; 5 border: 0; 6 height: 32px; 7 } 8 .biankuang{ 9 width: 270px; 10 height: 32px; 11 border: 1px solid black; 12 } 13 .set_input{ 14 width: 224px; 15 height: 32px; 16 } 17 .set_button{ 18 width: 46px; 19 height: 32px; 20 background: rgba(255,255,255,0.5); 21 }
标签:top 块级元素 解决 技术 .com css round 搜索框 hive
原文地址:http://www.cnblogs.com/jinvey-china/p/7554128.html