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> 

demo: http://jsfiddle.net/uao97l8q/


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -