En CSS 3, il y aura une norme pour cela. Aujourd'hui, vous pouvez le faire (uniquement pour Mozilla et les navigateurs basés sur Webkit) avec:
.roundBorder {
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
}
Sinon, vous pouvez utiliser plusieurs divs avec backgound-images, mais JQuery fournira un moyen plus simple (que je ne sais pas :()
La manière multiple div pourrait ressembler à ceci:
html:
<div class="topLeft">
<div class="topRight">
<div class="bottomLeft">
<div class="bottomRight">
<div class="content">
</div>
</div>
</div>
</div>
</div>
css:
.topLeft {
background-image: url('topLeft.png');
background-position: top left;
background-repeat: no-repeat;
}
.topRight {
background-image: url('topRight.png');
background-position: top right;
background-repeat: no-repeat;
}
.bottomLeft {
background-image: url('bottomLeft.png');
background-position: bottom left;
background-repeat: no-repeat;
}
.bottomRight {
background-image: url('bottomRight.png');
background-position: bottom right;
background-repeat: no-repeat;
}
Même si j'utilise IE8? – uzay95
À quoi fait référence votre question? Si vous avez demandé à propos de [...] - border-radius: Puisque cela ne fonctionne qu'avec mozilla ou webkit, il ne fonctionnera pas pour IE (ni pour l'opéra). Si vous avez demandé à propos de la deuxième partie (les divs empilés): cela devrait fonctionner dans tous les navigateurs courants. –