我有我的工作形象,使背景圖片的位置垂直居中向左
我想左側的圖標應該是在同一個位置,但垂直對齊中心... 圖標是不同的尺寸... 這可能通過CSS我想要什麼.. ??
這裏是我的代碼,
.iconSmall {
background-attachment: scroll;
background-clip: padding-box;
background-color: transparent;
background-origin: padding-box;
background-position: 2% 50%;
background-repeat: no-repeat;
}
<a href="index.html" style="background-image:url(images/001_56.png);" class="iconSmall">Beauty and Spas</a>
的圖標大小各不相同像一些圖標有更大的寬度較小的高度和一些有較小的寬度較大的高度,1或更多的圖標會放大...所以我不能使用固定的寬度或背景大小等... – SaurabhLP