jquery - how to create a pointed triangle on the left div -


i ask how create pointed div display comments of users. pointed div should :

enter image description here

do have idea? thanks

it should appear this put triangle on left side not on top.

#pointed { position: relative; margin: 0 auto; width: 50px; height: 50px; padding: 4px; color: white; background-color: rgba(0,0,0,.8); }  #pointed:after, #pointed::after { position: absolute; top: -5px; left: 22px; content: ''; width: 0; height: 0; border-bottom: solid 5px rgba(0,0,0,.8); border-left: solid 5px transparent; border-right: solid 5px transparent; } 

the triangle generated border properties, make point left need change css to:

#pointed:after, #pointed::after {     position: absolute;     top: 5px;     left: -5px;     content: '';     width: 0;     height: 0;     border-right: solid 5px rgba(0,0,0,.8);     border-bottom: solid 5px transparent;     border-top: solid 5px transparent; } 

http://jsfiddle.net/ln6zg/

for more information on how triangles generated take here http://css-tricks.com/snippets/css/css-triangle/


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -