Created
May 6, 2014 10:41
-
-
Save LeaVerou/11558395 to your computer and use it in GitHub Desktop.
Demo of shape-outside: border-box; by Lea Verou
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
/* | |
Demo of shape-outside: border-box; by Lea Verou | |
Original CSS Shapes demo by Sara Soueidan | |
*/ | |
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400); | |
.demo { | |
margin: 50px auto; | |
width: 100%; | |
font-family: "Open Sans"; | |
} | |
.user-profile img { | |
height: 50%; | |
width: 30%; | |
float: left; | |
border-radius: 50%; | |
margin-right: 15px; | |
margin-bottom: 10px; | |
shape-outside: margin-box; | |
} |
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
<div class="demo user-profile"> | |
<img src="http://api.randomuser.me/0.3.2/portraits/men/7.jpg" alt="" /> | |
<!-- <h3>John Doe</h3> --> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Harum itaque nam blanditiis eveniet enim eligendi quae adipisci? <p>Assumenda blanditiis voluptas tempore porro quibusdam beatae deleniti quod asperiores sapiente dolorem error! Quo nam quasi soluta reprehenderit laudantium optio ipsam ducimus consequatur enim fuga quibusdam mollitia nesciunt modi.</p> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nulla ipsam officia autem tenetur odit reprehenderit amet. Ut voluptatibus eum dolorem suscipit ipsa veniam animi dolore officia sunt magni assumenda vitae! | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium repellat cumque beatae aliquam earum odio. Earum corporis necessitatibus minus aut culpa tempore deleniti laudantium repellat autem consequuntur est quos doloribus. | |
</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