CSS Tricks and the Alternate Universe of Graphics Primitives
Posted by: K. Scott Allen,
on 25 Aug 2011 |
View original | Bookmarked: 0 time(s)
Someone asked about the circular div I used for magnification in an earlier post. There are no primitives in CSS for building arbitrary shapes, but like most things on the web, that doesn't stop anyone from trying. For example: don't think of a circular div as a circle. Think of a circular div as a square with heavily rounded corners. Given this markup: <div class="circle-small">
<p>Hello!</p>
</div>
And this CSS:
.circle-small
{
width:100px;
height:100px;
...