Css
<style>
.round {
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
display: block;
}
</style>
Html
<img class='imgr' src='http://directory.naprej.com/image1.jpg' width='300' height='200' alt='Coconut palm leaf'>
MooTools
<script>
window.addEvent('domready', function (){
$$('.imgr').each(function(imgr){
new Element('span', {
'class': 'round',
styles: {
'background-image': 'url(' + imgr.getProperty('src') + ')',
height: imgr.getProperty('height') + 'px',
width: imgr.getProperty('width') + 'px'
}
}).wraps(imgr);
$$('.round img').setStyle('opacity','0');
});
});
</script>
view demo
Related Posts
Borders CSS3, CSS3 Shapes