css技巧
来源:互联网 发布:安知玉如意书包网结局 编辑:程序博客网 时间:2024/05/18 12:30
1. border-collapse:collapse; 重叠线删除
2. table-layout:fixed;word-wrap: break-word; table中数据自动换行
3. 父: text-align:center; 子: margin-right: auto;margin-left: auto; 子div居中
4.ie6中div高度设置 默认高度为9px 因为字体默认font-size:9px;
clear:both;
font-size:0px;
5. clear:both; 前加</br>
6. 在IE6中,如果不设定父级元素的高度,则设定层高是无用的。于是修改了css,增加了下面一行:
body{height:100%}
将body的高度设置为撑开整个页面,问题解决。
7.ie6下a点击高度不居中解决方法:
.content a {
height: 26px!import;
height: 26px!;
line-height: 26px;
line-height: 26px!import;
width: 46px;
display: block;
background: url(../image/music/button.png) no-repeat;
text-align: center;
color: #3F3D3D;
text-decoration: none;
}
.content a:hover {
background: url(../image/music/button2.png) no-repeat;
text-decoration: none;
}
.content a:active {
text-decoration: none;
height: 26px!import;
height: 26px!;
line-height: 26px;
line-height: 26px!import;
}
.content a:visited {
text-decoration: none;
height: 26px!import;
height: 26px!;
line-height: 26px;
line-height: 26px!import;
}
8.ie6下li.hover 解决方案
page
<li><a href="javascript:void(0);" onclick="javascript:return false;">'+entry.item.cname+'</a></li>');
css
li{
cursor: pointer;
line-height:30px;
height:30px;
font-size:12px;
width:100%;
}
li a{
font-size:12px;
width:100%;
display:block;
line-height:30px;
height:30px;
outline: none;
}
li a:hover{
background-color: #E99211;
text-decoration:none;
color: #000;
}
li :active {
text-decoration:none;
star:expression(this.onFocus=this.blur());
}
2. table-layout:fixed;word-wrap: break-word; table中数据自动换行
3. 父: text-align:center; 子: margin-right: auto;margin-left: auto; 子div居中
4.ie6中div高度设置 默认高度为9px 因为字体默认font-size:9px;
clear:both;
font-size:0px;
5. clear:both; 前加</br>
6. 在IE6中,如果不设定父级元素的高度,则设定层高是无用的。于是修改了css,增加了下面一行:
body{height:100%}
将body的高度设置为撑开整个页面,问题解决。
7.ie6下a点击高度不居中解决方法:
.content a {
height: 26px!import;
height: 26px!;
line-height: 26px;
line-height: 26px!import;
width: 46px;
display: block;
background: url(../image/music/button.png) no-repeat;
text-align: center;
color: #3F3D3D;
text-decoration: none;
}
.content a:hover {
background: url(../image/music/button2.png) no-repeat;
text-decoration: none;
}
.content a:active {
text-decoration: none;
height: 26px!import;
height: 26px!;
line-height: 26px;
line-height: 26px!import;
}
.content a:visited {
text-decoration: none;
height: 26px!import;
height: 26px!;
line-height: 26px;
line-height: 26px!import;
}
8.ie6下li.hover 解决方案
page
<li><a href="javascript:void(0);" onclick="javascript:return false;">'+entry.item.cname+'</a></li>');
css
li{
cursor: pointer;
line-height:30px;
height:30px;
font-size:12px;
width:100%;
}
li a{
font-size:12px;
width:100%;
display:block;
line-height:30px;
height:30px;
outline: none;
}
li a:hover{
background-color: #E99211;
text-decoration:none;
color: #000;
}
li :active {
text-decoration:none;
star:expression(this.onFocus=this.blur());
}
- CSS技巧
- CSS技巧
- css技巧
- css技巧
- CSS技巧
- css 技巧
- css技巧
- CSS技巧
- css技巧
- css技巧
- css技巧
- CSS技巧
- CSS技巧
- css技巧
- css技巧
- CSS技巧
- css技巧
- CSS技巧
- javascript中自定义对象的属性方法
- 编译出错 ERROR: 9-patch image ********.9.png malformed
- 输入框属性只读时 回格键时屏蔽
- 页面关闭或刷新时
- E 文学习
- css技巧
- 删除文件夹下SVN自动生成的文件的一个bat方法
- 【Android】短信应用——短信(会话)实时删除
- Hello World
- 非循环单链表的基本操作
- 文件下载链接改成按钮时
- 使用LoadRunner测试Oracle ADF应用的小结
- android recovery模式流程
- linux下安装eclipse