Home >Web Front-end >HTML Tutorial >CSS ul li a background image and text alignment_html/css_WEB-ITnose
f4dc3bf4ab497271d3ecf31c2bc11a74
c1a436a314ed609750bd7c7d319db4daE-commerce2e9b454fa8428549ca2e64dfac4625cd
047295b93e417a2ac58a1404297e7679
ff6d136ddc5fdfeffaf53ff6ee95f185
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Convenient order management 15db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6 ee7959cc8dd4be16ef633321c03dac32Convenient order management 25db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Convenient order management 35db79b134e9f6b82c0b36e0489ee08ed bed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Convenient order management 45db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6e729f987a20b7718c76418a021c9b6b5 Convenient order management 55db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
929d1f5ca49e04fdcb27f9465b944689
16b28748ea4df4d9c2150843fecfba68
1 2 3 .four { 4 width: 336px; 5 height: 200px; 6 background: #eee; 7 float: left; 8 margin: 5px; 9 }10 11 .four img {12 height:120px;13 float: left;14 margin-left:10px;15 padding:6px;16 background:darkgray;17 }18 19 .four ul { 20 float: left;21 }22 23 .four li {24 background:url(./images/black.png) center left no-repeat ;25 height:15px;26 margin:10px;27 background-size:3px;28 padding-left:10px;29 font:12px/15px "黑体";30 31 }32 33 .four a {34 }35 36 .four a:visited {37 color:gray;38 }39 40 .four h2 {41 margin:6px 0 6px 10px;42 font-size:16px;43 }44 45
dc6dce4a544fdca2df29d5ac0ea9906b
15b86f027c2175d1a62b5fd7fd385c0e
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Article 15db79b134e9f6b82c0b36e0489ee08ed bed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Article 15db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32 Article 15db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Article 15db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c67c2ae23f63c4174ca24b8afb5e3147b5ee7959cc8dd4be16ef633321c03dac32Article 15db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
929d1f5ca49e04fdcb27f9465b944689
16b28748ea4df4d9c2150843fecfba68
1 #art { 2 background:#EEE; 3 margin-top:3px; 4 padding-top:10px; 5 } 6 7 #art li { 8 height:30px; 9 /*border:1px green solid;*/10 }11 12 #art a {13 margin-left:5px;14 display:block;15 background:url(./images/Art_li.png) no-repeat left;16 background-size:5px;17 height:30px;18 padding-left:20px;19 font:16px/30px "simsum";20 21 }22 23 #art a:hover {24 background:url(./images/7.jpg);25 /*background:url(./images/33.png) no-repeat left ;*/26 text-decoration:none;27 }Firefox uses the height of li, and IE can directly set the height of the a tag
ada442393f9f941237cb0e496c17b0f5
447676c97b79050ab03d07e10ce8055d 9e490bea09a82f3ff6663081fb0e947b
25edfb22a4f469ecb59f1190150159c6b5a63eb323562bbd99b282e6a2c94492Navigation 15db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Navigation 25db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c617c619a2b884e8c7d98da26361b8e170Navigation 35db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Navigation 45db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Navigation 55db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Navigation 65db79b134e9f6b82c0b36e0489ee08ed548cefb384a95312edb7e8fb1f4ecc29
25edfb22a4f469ecb59f1190150159c6ee7959cc8dd4be16ef633321c03dac32Navigation 75db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
929d1f5ca49e04fdcb27f9465b944689
16b28748ea4df4d9c2150843fecfba68
1 #header { 2 height: 192px; 3 background: darkgray url(images/header3.jpeg) no-repeat; 4 } 5 6 7 8 #nav li { 9 background: #F0F8FF;10 width: 90px;11 margin: 1px;12 float: left;13 height:37px;14 //border:1px red solid;15 line-height: 37px;16 }17 18 #nav a {19 /*font-size: 15px;*/20 /*line-height: 37px;*/21 font:15px/37px '黑体' sans-serif;22 color: darkgray;23 display: block;24 width: 90px;25 text-align: center;26 color: #363636;27 }28 29 #nav a:hover {30 color: white;31 background-color: orange;32 }