首页 > 代码库 > css固定广告栏

css固定广告栏

<div style="position: fixed; left: 50%; top: 100px; margin-left: -621px;">
<div>
<img src="http://www.mamicode.com/images/duilian.jpg" />
</div>
<div style="background-color: #cccccc; padding: 10px 0; text-align: center;">
<a href="http://www.mamicode.com/#">关闭</a>
</div>
</div>
<div style="position: fixed; left: 50%; top: 100px; margin-left: 556px;">
<div>
<img src="http://www.mamicode.com/images/duilian.jpg" />
</div>
<div style="background-color: #cccccc; padding: 10px 0; text-align: center;">
<a href="http://www.mamicode.com/#">关闭</a>
</div>
</div>

css固定广告栏