multizone.cz » IT a programování Informační technologie, PHP, Javascript, jQuery, html, css, MySQL, Postgresql, Linux

IT a programování » Nifty corners, zaoblené rohy ve všech prohlížečích

Řešení v CSS

div.#test {
background:#f00;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
border-radius: 5px;
width: 300px;
line-height: 100px;
font-size:20px;
text-align:center;
}
Hello world
Hello world!

Bohužel, nejhloupější ze všech prohlížečů, Internet Explorer verze 6, 7 ani 8 tyto vlastnosti nepodporuje, takže se musíme uchýlit k řešení v javascriptu.

Originální skript Nifty Corners Cube

http://www.html.it/articoli/niftycube/index.html nebo http://www.html.it/articoli/nifty/index.html.

Nifty Corners Cube portovaný do jQuery:

http://dev.jquery.com/~paul/plugins/nifty/.

JQuery Curvy Corners

http://blue-anvil.com/archives/anti-aliased-rounded-corners-with-jquery.

DEMO & download:

http://blue-anvil.com/jquerycurvycorners/test.html.

 

 

blog comments powered by Disqus