如何将插入的图片在HTML页面指定相对位置

<div style="text-align: right;font-size: 26px;background:url('../o2_core/o2/xDesktop/jlrc_bgimg/meng_banner.png') no-repeat center;width:100%; height:770px;">
<ul style="top:270px;position:relative;margin:0 auto;width:1010px;height:55px;list-style:none;">
<li>
<a style='list-style: none;margin: 0;text-decoration: none;font-size: 20px;color: #FFF;font-family: "黑体";font-weight: bold;float: left;padding: 0px 28px 0px 28px;display: block;height: 55px;line-height: 55px;' href="/" title="首页">首页a>
li>
<li>
<a style='list-style: none;margin: 0;text-decoration: none;font-size: 20px;color: #FFF;font-family: "黑体";font-weight: bold;float: left;padding: 0px 28px 0px 28px;display: block;height: 55px;line-height: 55px;' href="/" title="公司新闻">公司新闻a>
li>
<li>
<a style='list-style: none;margin: 0;text-decoration: none;font-size: 20px;color: #FFF;font-family: "黑体";font-weight: bold;float: left;padding: 0px 28px 0px 28px;display: block;height: 55px;line-height: 55px;' href="/" title="文件发布">文件发布a>
li>
ul>
<div style="top:295px;position:relative;margin:0 auto;width:1010px;height:300px;list-style:none;">
<div style="position: relative;float: left;">
<img id="img" src="../o2_core/o2/xDesktop/jlrc_bgimg/p1.jpg" width="600">
div>

<div style="background:#fff5eb;" class="wang-left-top3-rig navBlock">
div>
div>
div>

截图
如何将插入的图片在HTML页面指定相对位置_第1张图片
如何将插入的图片在HTML页面指定相对位置_第2张图片
用大div套小div,大div定宽,剧中,小div设置为相对位置靠左漂浮即可。position: relative;float: left;

你可能感兴趣的:(如何将插入的图片在HTML页面指定相对位置)