html - Creating sticky-notes ( post-it ) -
i designing web page.
and want use sticky-notes (post-it) in page. where, each sticky-note added when click add button... color of sticky notes must change randomly, , must tilted , must have hover effect.
how can ? css , html must used.
i tried code got website
but, had part of website list..so when used code, make list items sticky note.. want give property div
html
<html> <head> <ul> <li> not use sticky note </li> </ul> <div class="sticky"> -------------want give property div <ul class="sticky"> <li > <p >stickynote1</p> </li> <li class="r" > stickyonote2 </li> </ul> </div> <div> </div> </div> </div> </div> </div> </body> </html>
it's not possible generate random number(and random color) using css & html. javascript or server side language php needed.
however simulate random colour having list of items , have each note random colour. random colour chosen same every time reset page.
html
<ul class="sticky"> <li>note text</li> <li>note text</li> <li>note text</li> </ul>
css
.sticky li { background-color: red; } .sticky li:nth-child(2n) { background-color: green; } .sticky li:nth-child(3n) { background-color: yellow; } .sticky li:nth-child(5n) { background-color: blue; }
in case note sequence
red, green, yellow, green, blue, green, red, green, yellow, blue
which give first time user feeling of random.
where 2n , 3n have same values, 3n take precedence, , 3n , 5n have same values, 5n take precedence, , on.
method in link posted similar wrote. see section random color
ul li:nth-child(even) a{ -o-transform:rotate(4deg); -webkit-transform:rotate(4deg); -moz-transform:rotate(4deg); position:relative; top:5px; background:#cfc; } ul li:nth-child(3n) a{ -o-transform:rotate(-3deg); -webkit-transform:rotate(-3deg); -moz-transform:rotate(-3deg); position:relative; top:-5px; background:#ccf; }
you've changed question quite bit if want apply same effect div instead of 'ul li try changing occurrences of '.sticky li:nth-child' 'div.sticky:nth-child
Comments
Post a Comment