So erstellen Sie einen Block Hover-Effekt für eine Liste mit Links
Dieses Tutorial erklärt, wie Sie ein Block-Hover-Effekt für eine Liste von Links Form mit einem sauberen CSS-Design mit nur li, Kalibrier-und EM-Tags.
Schritt: 1 Grundlegende HTML-Struktur
> <ul> <li> <a href = "#" > Link Heading One <em> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut viverra dui nec risus. <div id = "linkBox"> <ul> <li> <a href = "#"> Link Kopftitel Ein <em> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut viverra dui nec risus. href = "#" > Link Heading Two <em> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut viverra dui nec risus. In der EU ein neque tortor lacinia rhoncus. </ Em> <span> 20. Juni 2009 </ span> </ a> </ li> <li> <a href = "#"> Link Kopftitel Zwei <em> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut viverra dui nec risus. href = "#" > Link Heading Three <em> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut viverra dui nec risus. In der EU ein neque tortor lacinia rhoncus. </ Em> <span> 21. Juni 2009 </ span> </ a> </ li> <li> <a href = "#"> Link Kopftitel Drei <em> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut viverra dui nec risus. In der EU ein neque tortor lacinia rhoncus. </ Em> <span> 22. Juni 2009 </ span> </ a> </ li> </ ul> </ div>
Schritt: 1 CSS-Code
list-style-type : none ; width : 400px ; } #linkBox li { margin : 5px 0 ; border-bottom : 1px dotted #ccc ; border-top : 1px dotted #ccc ; } #linkBox li a { color : #E67701 ; display : block ; font : bold 100 . 1 % "Georgia" , Times New Roman, Times, serif ; padding : 5px ; text-decoration : none ; line-height : 182 . 5 %; } * html #linkBox li a { /* make hover effect work in IE */ width : 400px ; } #linkBox li a :hover { background : #eeeeee ; } #linkBox a em { color : # 333 ; display : block ; font : normal 82 . 5 % "Georgia" , Times New Roman, Times, serif ; line-height : 182 . 5 %; } #linkBox a span { color : #006AFF ; font : normal 82 . 5 % "Georgia" , Times New Roman, Times, serif ; line-height : 150 % ; } # linkBox ul (list-style-type: none; width: 400px;) # linkBox li (margin: 5px 0; border-bottom: 1px dotted # ccc; border-top: 1px dotted # ccc;) # linkBox li a ( color: # E67701; display: block; font: bold 100. 1% "Georgien", Times New Roman, Times, serif; padding: 5px; text-decoration: none; line-height: 182. 5%;) * html # linkBox li a (/ * Hover-Effekt macht in IE * / width: 400px;) # linkBox li a: hover (background: # eeeeee;) # linkBox ein em (color: # 333; display: block; font: normal 82. 5% "Georgien", Times New Roman, Times, serif; line-height: 182. 5%;) # linkBox einer Spannweite (color: # 006AFF; font: normal 82. 5% "Georgien", Times New Roman , Times, serif; line-height: 150%;)
Das Beispiel
Schließlich sind wir tun. haben wir eine Block-Hover-Effekt für eine Liste von Links. Sehen Sie meinem Beispiel und rollen über die Liste Elemente, um zu sehen, die Block-Hover-Effekt in Aktion.
Weitere Artikel:
Wenn Sie viel Freude beim Lesen dieses Artikels finden Sie andere Verwandte Artikel unter:



















































Sag uns Deine Meinung!