![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||||||||||
![]() |
![]() |
![]() |
shinichi♥stranger carol♥z-motion aquila♥(inky);paper map♥swordmanspirit |
![]() |
||||||||||||||||||||||||
![]() |
![]() |
![]() |
![]() |
|||||||||||||||||||||||||
CSS tutorials: Rounded cornersLevel:
If you take a tour on Grieved-Lightness and have a look at the avatars or webdesign pages you'll notice that all numbers of the pages are encircled by rounded rectangles. Actually these are normal rectangles but with a trick you can add some radius. ![]() 1. Creating an objectFirst of all you need to create an object that should be surrounded by those rounded corners. To make things more clear I'll do this with an ordinary text link which looks like this:<a href="link.html" class="rcorner">I'm the most beautiful link you've ever seen</a> 2. Definitions within CSSSince we have a class-attribute (class="rcorner") here we need to define it somewhere in the related CSS-document (1). To do so open up your stylesheet and create a class which is called "rcorner". Remember that for a link we need to define attributes for different states: static, visited, active and hover (2). In addition we need to define some basic definitions, too (2+). Then your link should look simlar to the rectangle in the examplary image above.(1) .rcorner{} 3. Make your corners go-roundThe problem with such effects is the differences between browsers. Sometime it works sometimes not. To make your rounded corner work on nearly all web-browsers we need to add the following lines to the definitions (2) which comprehend attributes for different browsers.border-radius:3px; Even though this effect is pretty nice it isn't W3C valid and will conjure up some unlovely errors. Unfortunately border-radius won't be displayed in Opera (10+) anymore ;_: last updated on February 4, 2010
⬅ GO BACK
|
|
|||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||