html - Ribbon and stars - How to get this done without an image file? -
i need create ribbon , stars (image attached) without image file. know how put stars in it, needing ribbon sides image attached. how can without image file, , pure css , html? thinking border-radius need manipulated here.
this have far, terrible.
how can use border-radius
effect?
i recommend combining css triangles pseudo elements :before
, :after
side triangles of ribbon, , html character ★ stars:
html:
<h1>★ kristine coady ★</h1> <!-- ★ html star character -->
css:
h1{ /* regular attributes here */ background:#a52927; display:inline-block; padding:0px 30px; color:#eee4d3; position:relative; height:40px; line-height:40px; } h1:before{ /* create white triangle on left side */ position:absolute; content:""; top:0px; left:0px; height:0px; width:0px; border-top: 20px solid transparent; border-left: 20px solid white; border-bottom: 20px solid transparent; } h1:after{ /* create white triangle on right side */ position:absolute; content:""; top:0px; left:auto; right:0px; height:0px; width:0px; border-top: 20px solid transparent; border-right: 20px solid white; border-bottom: 20px solid transparent; }
this way not have use wrappers or border-radius.. should ofcourse alter font, font size, height, (etc.) needs..
Comments
Post a Comment