Закругленные уголки с помощью VML и CSS3
![]()
Наткнулся на очень интересный вариант решения очень популярной проблемы многих веб-мастеров — закругление блоков.
Для этого варианта закругления используются VML и CSS3.
Решение без картинок, работает во всех Internet Explorer'ах включая 5ый, в Firefox, в Safari, но к сожалению в старых версиях Opera не работает.
VML(англ. Vector Markup Language — язык векторной разметки) разработан фирмой Microsoft для описания векторной графики. ©wikipedia
Не буду тянуть и сразу покажу Вам css код:
v\:roundrect {
color:#FFF;
display:block;
background-color:#000;
padding:20px;
height:100%;
/* Для закругления уголков в остальных браузерах */
-moz-border-radius:10px;
-webkit-border-radius: 10px;
border-radius: 10px;
}
/* Для ie */
v\:roundrect {
behavior:url(#default#VML);
/background-color:transparent;
}
Наверное вы уже поняли, этот css код для закругления уголков в IE использует VML, а для остальных браузеров использует CSS3.
Теперь код самих блоков:
<!-- Подключаем VML -->
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />
<v:roundrect arcsize=".04" fillcolor="#000">
Привет, я закругленный блок!
</v:roundrect>
Поясню этот код. Первая строчка подключает VML. Параметр блока arcsize отвечает за радиус закругления, fillcolor отвечает за фон блока.
Не буду утверждать, что этот способ наиболее правильный, но он тоже интересен и имеет право на жизнь.

Если внедрять этот xml:namespace блок то вроде это не валидный xhtml получается. Генерить через яваскрипт тоже некрасиво и излишне
В Опере 9.51 не работает. А так все красиво реализовано.
Работает. Везде работает кроме соответстенно IE6
У меня тоже в Опере 9.5 не работает=(
и у мну не работает. мож какое шаманство надо заюзать?
И в Опере 9.21 тоже не работает..
а в FF вообще жесть. блок сам по себе, текст под блоком сам по себе )
А зачем это надо сейчас, если это не работает на основных броузерах?
чуваки ведь написано что не работает в Опере, чожь постить это по несколько раз )) ?
лучше бы нашли хак чоб заработало
Во-первых сейчас основной браузер это IE и в нем работает.
Во-вторых он работает в Firefox 3 и Safari.
В-третьих важно не количество браузеров в котором это работает, а оригинальность решения.
В IE8 не работает
как по мне это хороший толчек к побуждению в области дальнейшей разработки
Ну с одной стороны я согласен с вами.
Но почему-то ie7, правда запущенный через эмуляцию винды на маке отказался показывать вообще что-либо.
Опера, я так понимаю, тоже не очень хочет это показывать.
В опере вообще не работает, опера не поддерживает не VML, не CSS3, но зато уголки в опере можно сделать с помощью SVG.
Способ, возможно, оригинальный, но редкостно не кроссбраузерно и очень не красиво
В опере и Ие не работает, выходит что способ использовать не комильфо :)
а примерчик можно лицезреть?
Вроде бы вот —http://elv1s.ru/files/html+css/vector-corners.html
прелестно !
кто может возразить?
VML – очередное «изобретение» Micro$oft?
В новой версии оперы (9.52) не работает.
Угу. Оказалось, что опера так и не начала поддерживать
css3, даже в новых версиях.А я ошибочно полагал, что это не так.
Я об этом уже давно написал.http://blog.ad.by/2008/03/nice-rounded-corners-for-ie-safari.html
http://bolknote.ru/2008/07/18/~1786
А товорищ BOLK недавно добавил ещё и SVG, чтобы это и в опере работало.
Угу, уже позже наткнулся на вашу запись, очень полезно было ее прочитать ;-)
Много слышал о VML, но никак даже строчка на глаза не попадалась. ) Увидел наконец на вашем блоге. Очень интересное решение, хотя пользоваться им, конечно, сейчас вряд ли стоит.
Что делать, если у блока, которому мы скругляем углы стоит картинка фоном? Картинка встает фоном всему блоку, а не по границам скругления.
Что-то на блоге не работают у вас категории! Обратите внимание.
прием интересный, но блок получается с рамкой, причем черной, и как я понял, она не убирается и цвет ее не меняется. Иногда в дизайн не вписывается :-(
понимаю, что на момент написания статьи IE8 не был выпущен официально, но в нём не работает данный вариант. Работает только в режиме эмуляции ИЕ7.
в опере только с 10 версии обещают включить поддержку border-radius
I just want to say I am very new to blogging and definitely enjoyed your web-site. Likely I’m likely to bookmark your site . You actually come with really good articles. Thanks a lot for revealing your web-site.
I just want to say I am newbie to blogging and truly liked your blog site. Almost certainly I’m planning to bookmark your website . You definitely come with incredible writings. Thank you for sharing your webpage.
I’m impressed, I must say. Really rarely do I encounter a blog that’s both educative and entertaining, and let me tell you, you have hit the nail on the head. Your idea is outstanding; the issue is something that not enough people are speaking intelligently about. I am very happy that I stumbled across this in my search for something relating to this.
You made some decent points there. I looked on the internet for the issue and found most individuals will go along with with your website.
Hair transfer also known as hair transplantation in turkish name sa ekimi is the operation where the hairs are transplanted towards the canals which are opened on the direction with the persons former hair by lateral slits sa ekimi towards the requested region. The follicles which are genetically healthy are located inside the region between two ears and top side of sa ekimi the nape area are taken 1 by 1 with the assist of micromotor that is used by Med Hair team.
I don’t normally comment but I gotta admit thanks for the post on this great one : D.
I reckon something truly special in this internet site.
Keep up the wonderful work , I read few posts on this web site and I believe that your site is really interesting and has lots of excellent info .
I went over this web site and I believe you have a lot of fantastic info, saved to fav (:.
Very good info can be found on web blog.
We are a gaggle of volunteers and starting a new scheme in our community. Your website offered us with valuable information to work on. You have performed an impressive process and our entire group shall be thankful to you.
A unique discussion might be priced at comment. I believe that you should produce more on this specific topic, may well be a taboo topic but frequently people are too few to speak for such topics. To the next. Best wishes
How can i extend the range of the Wireless N router? I’ve an Xtreme N handheld router (Dlink). I have to extend the reach inside the wireless signal. I know how to do it to the G signal. I would like to know how to do the thought for an N sign. Could it be possible make utilization of regular N routers as repeaters. If that’s the case, the way to configure them. Many thanks for that information and facts.
Hello.This article was extremely remarkable, especially because I was browsing for thoughts on this topic last Tuesday.
Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how can we communicate?
Previously you have to have efficacious online income techniques to get you started across experiencing details excellent for an individual’s web-based business organisation. e-wallet
We’re a group of volunteers and opening a brand new scheme in our community. Your site provided us with useful info to paintings on. You have performed a formidable process and our whole group shall be grateful to you.
Respect to post author, some excellent selective information .
I haven’t checked in here for some time as I thought it was getting boring, but the last several posts are great quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend :)
F*ckin’ amazing things here. I’m very glad to peer your article. Thanks a lot and i’m looking ahead to touch you. Will you please drop me a mail?
I cherished up to you will obtain carried out right here. The caricature is tasteful, your authored material stylish. however, you command get got an impatience over that you would like be handing over the following. in poor health indubitably come further previously once more since precisely the same just about a lot continuously inside of case you protect this hike.