Created
December 12, 2013 08:13
-
-
Save hidoos/7924731 to your computer and use it in GitHub Desktop.
margin 计算百分比
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
/** | |
* margin 计算百分比 | |
*/ | |
body,div,p{ | |
margin:0; | |
padding:0; | |
} | |
/*===========================================*/ | |
.margin-wrap{ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
width:1000px; | |
height:500px; | |
} | |
.margin-wrap p{ | |
width:300px; | |
background:#ccc; | |
color:black; | |
} |
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
<!-- content to be placed inside <body>…</body> --> | |
<div class="margin-wrap"> | |
<p>测试一下margin的百分比</p> | |
</div> |
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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment