2 回答
TA贡献1824条经验 获得超8个赞
为锚标记添加了一些填充:padding-left:15%;
.menu22 {
padding-left: 0;
list-style: none;
width: 300px;
margin: 0 auto;
}
.menu22 li {
background-image: url("https://i.ibb.co/SyCRm7z/1.png");
background-repeat: no-repeat;
background-position: 15px center;
position: relative;
}
.menu22 li:hover {
color: #404040 !important;
font-weight: 700 !important;
letter-spacing: 1px;
background-image: url("https://i.ibb.co/SyCRm7z/1.png");
-webkit-box-shadow: 0px 5px 40px -10px rgba(0,0,0,0.57);
-moz-box-shadow: 0px 5px 40px -10px rgba(0,0,0,0.57);
transition: all 0.3s ease 0s;
padding-left:6%;
}
.menu22 a{
display: block;
padding: 23px 0;
color: grey;
font-size: 18px;
text-decoration: none;
text-align: center;
padding-left:15%;
}
<ul class="menu22">
<li><a href="#">object1</a></li>
<li><a href="#">Lorem ipsum dolor sit amet</a></li>
<li><a href="#">object3</a></li>
<li><a href="#">Lorem ipsum dolor sit </a></li>
<li><a href="#">object5</a></li>
<li><a href="#">Lorem ipsum dolor sit amet</a></li><br>
</ul>
- 2 回答
- 0 关注
- 94 浏览
添加回答
举报