html - Javascript vertical line coming from the bottom of an element -
my idea make lolipop has infinite vertical line coming off of bottom of circle (in case rectangle). read may done using css :after psuedoelements limit want do. prefer have line own element. there way go this?
a div
small width
, lot more higher height
make perfect "stick".
example (rectangular lolipop :d):
css:
#lolipop { height: 400px; width: 200px; position: absolute; bottom: 0; } #lolipop .rect { width: 100px; height: 75px; background-color: red; margin: 0 auto; } #lolipop .stick { width: 5px; height: 325px; background: green; margin: 0 auto; }
html:
<div id="lolipop"> <div class="rect"></div> <div class="stick"></div> </div>
Comments
Post a Comment