**html**
<html>
<head>
<link rel="stylesheet" href="style.css" ... />
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="comcast"><img src=Desert.jpg width="18px" height="40px"></img></div>
<div id="menu"><img src=Hydrangeas.jpg width="48px" height="40px"></img></div>
</div>
<div id="content">
<div id="content-left"><img src=Desert.jpg width="180px" height="1000px"></img></div>
<div id="content-main"><img src=Hydrangeas.jpg width="700px" height="1000px"></img></div>
</div>
<div id="footer"></div>
<div id="bottom"></div>
</div>
</body>
</html>
**css**
body
{
font-family:arial,helvetica,sans-serif;
font-size:12px;
}
#wrapper
{
margin:0px auto;
border:1px solid #bbb;
padding:10px;
}
#header
{
border:1px solid #bbb;
height:80px;
padding:10px;
}
#content
{
margin-top:10px;
padding-bottom:10px;
}
#content div
{
padding:10px;
border:1px solid #bbb;
float:left;
}
#content-left
{
width:180px;
}
#content-main
{
margin-left:10px;
width:700px;
}
#footer
{
float:left;
margin-top:10px;
margin-bottom:10px;
padding:10px;
border:1px solid #bbb;
width:878px;
}
#bottom
{
clear:both;
text-align:right;
}
*{
margin:0px;
}
#menu
{
float:right;
}
问题是如果我做 zoomin 或 zoomout 左边的内容和内容主要的 div 是困惑的。我的要求是如果我们放大或缩小 contentleft 和 contentmain它应该缩小,不应该困惑。我怎样才能做到这一点。
最佳答案
在具体处理该问题之前,您需要修复一些 HTML suntax/validation 问题
<img src=Hydrangeas.jpg width="48px" height="40px"></img>
应该是
<img src="Hydrangeas.jpg" width="48" height="40" />
- 用“”包裹属性
- 不要求像素的宽度和高度。
- 删除并终止打开标记为/>
关于html - html页面的放大缩小问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10552865/