在写css的时候最好先把所有的margin, padding, border先设置好?
在设置div的居中前,先设置好div的宽度,否则无法判断如何放置你div中的内容
.seabtn{float:left;width:70px;height: 40px;
border:none;background: url("../images/seabtn.gif")no-repeat 0px 0px; // 图片从左上角0px 0px开始截取图片
text-indent:-999em;}
.seabtn:hover{background-position:-1px -67px;} //从左上角-1px -67px开始截取图片
../images/seabg.gif // ../表示返回根目录
善于使用margin、padding和border,还有line-height表示行高。
border的使用:border-bottom:none; 使底边为无。有时候在画边框的时候可以用上,还有border-left、right等等。
text-indent:缩进。 text-indent:-999em; 一般缩到看不见了