Last active
January 4, 2016 18:29
-
-
Save holyzfy/8661288 to your computer and use it in GitHub Desktop.
解决IE6中absolute定位的问题
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
.wrap { position: relative; width: 400px; height: 300px; border: 1px solid #000;} | |
.content {float: left; width: 100%; height: 300px; background-color: #ccc;} | |
.abs {position: absolute; left: 50px; top: 50px; padding: 5px 8px; background-color: #080; color: #fff; font-size: 14px;} | |
</style> | |
</head> | |
<body> | |
<div class="wrap"> | |
<div class="content"></div> | |
<div class="abs">ie6: 这句话看不到了</div> | |
</div> | |
<hr> | |
<div class="wrap"> | |
<div class="content"></div> | |
<div> | |
<div class="abs">ie6: <s>这句话看不到了</s>(外面套个空div就好了)</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment