母版页中Css的属性不显示的情况
这里写下关于asp.net中Css属性的设置的一些bug情况(没有达到预期的效果),
- max-heigth、max-width、min-width、min-heigth
如果外层容器设置了float,当容器载入动态内容时,这里以min-heigth为例,
<div>top</div>
<div>content<div>dynamic</div></div>
<div>foot</div>
#content
{
min-height:300px;
}
#dynamic
{
float:left;
min-height:300px;
}
撑开内容后content的背景并不会被复制,正确的做法,定位用position:absolute or relative;
利用max和min的width和height来做简单的图片的放大效果。
<div class="demo"><a><img src="book.gif" alt="" /></a></div>
.demo
{
min-width:100px;
}
.demo img
{
width:100px;
}
.demo a:hover img
{
width:auto;
}
{
min-width:100px;
}
.demo img
{
width:100px;
}
.demo a:hover img
{
width:auto;
}
发现Css问题再更新,记着备忘。