2007-07-03
小区域图形背景整合时出现的间隙问题
关键字: font-size:1px;css 代码
- .btop{
- width:900px;
- height:10px;
- background:url(images/napic/top.jpg) no-repeat top left;
- }
- .bbottom{
- width:900px;
- height:10px;
- background:url(images/napic/bottombottom.jpg) no-repeat bottom left;
- }
- .bcontent{
- margin:0;
- width:880px;
- padding:0 10px;
- background:url(images/napic/contentbg.jpg) repeat-y top left;
- }
仔细研究过后发觉问题可能出现在line-height上,补上后不见好转,:( 之后又联想到font-size,分别在btop、bbottom加上font-size:1px;这样一条属性值,问题解决。:)
核心原因: 在body选择符中定义了font-size:14px;而btop、bbottom这两个类选择符中只定义了height:10px; 所以在IE下出现了破格 4px的现象。
css 代码
- body{
- background:#b30d0e url(images/napic/bg.jpg) repeat-x top left;
- color:#646464;
- font-family: "宋体";
- font-size:14px;
- line-height:18px;
- padding:20px;
- }
发表评论
- 浏览: 47322 次
- 性别:

- 来自: 上海

- 详细资料
搜索本博客
我的相册
w3c01
共 46 张
共 46 张
最近加入圈子
链接
最新评论
-
成功的用户体验必须遵循的 ...
是的,真正从用户需求和网站目标开始说起的话,有很多可以说~ 等后面有时间写点更加 ...
-- by tiger.passion -
成功的用户体验必须遵循的 ...
还可以说的更详细点阿!
-- by lxdhdgss -
SEO之网站结构优化
有没有 优化 比较好的 网站例子 共享下
-- by 风雪涟漪 -
SEO之网站结构优化
不错 。学习了。期待有更好的文章
-- by 风雪涟漪 -
Firefox 3 Beta 4已完成测 ...
迫不及待呀
-- by boy in the road






评论排行榜