0
我想使用CSS来确保我的页面上的图像将调整大小,如果屏幕低于特定分辨率或低于特定大小的窗口。我已阅读使用{max-width:100%},我已将其纳入我的代码中,但该图像没有调整大小。图像宽度为500px。如何确保图像流畅并将调整大小?
谢谢!
CSS和HTML:
.left{
float:left;
width:600px;
}
.right{
float:right;
width:400px;
}
#logoimage{
width: 100%;
margin: 50px auto;
max-width: 100%;
}
#navbar{
text-align: center;
font-family: 'Special Elite', cursive;
color:white;
font-size: 80px;
font-style: bold;
display: block;
margin: 60px auto;
}
<body>
<div class="left">
<div id="logo">
<img src="/pictures/logo.png">
</div>
</div>