<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>图片自适应大小</title>
<style type="text/css">
#con
{
width:80%;
height:80%;
max-width:350px;
min-width:200px;
border:1px solid red;
}
</style>
</head>
<body>
<center>
<div id="con">
<img src="test.jpg" style="height: 100%; width:100%;" />
</div>
</center>
</body>
</html>
图片自适应大小
猜你喜欢
转载自blog.csdn.net/Baiychenvip/article/details/8742862
今日推荐
周排行