1、如何让DIV在浏览器中垂直居中
<style type="text/css">
<!--
div {
position:absolute;
top:50%;
left:50%;
margin:-150px 0 0 -200px;
width:400px;
height:300px;
}
-->
</style>
2、a标签点击后的虚线框问题,可通过加入以下内容,来解决:
a {outline: none;}
a:active {
outline: none;
star:expression(this.onFocus=this.blur());
}
3、div块定位在浏览器窗口的固定位置的方法,会随着浏览器的下拉而滚动
.focus {
Z-INDEX: 300;
POSITION: fixed;
BOTTOM: 0px;
RIGHT: 0px;
PADDING-RIGHT: 8px;
FLOAT: right;
OVERFLOW: hidden;
WIDTH: 255px;
}
* HTML .focus {
POSITION: absolute;
TOP: expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight)
}
<style type="text/css">
<!--
div {
position:absolute;
top:50%;
left:50%;
margin:-150px 0 0 -200px;
width:400px;
height:300px;
}
-->
</style>
2、a标签点击后的虚线框问题,可通过加入以下内容,来解决:
a {outline: none;}
a:active {
outline: none;
star:expression(this.onFocus=this.blur());
}
3、div块定位在浏览器窗口的固定位置的方法,会随着浏览器的下拉而滚动
.focus {
Z-INDEX: 300;
POSITION: fixed;
BOTTOM: 0px;
RIGHT: 0px;
PADDING-RIGHT: 8px;
FLOAT: right;
OVERFLOW: hidden;
WIDTH: 255px;
}
* HTML .focus {
POSITION: absolute;
TOP: expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight)
}