不知道人们为什么删除自己的岗位上,但它能够帮我找出使用SVG +掩盖得到什么我是后的解决方案: http://f.cl.ly/items/1V403r09460s0P420w07/arrow-button.html
我创建了图像掩模之前和之后,这允许我保持宽度流体,并通过转换来改变悬停颜色。
<style>
a.arrow {
background: #015880;
color: white;
display: -moz-inline-stack;
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
zoom: 1;
*display: inline;
position: relative;
line-height: 70px;
padding: 0 20px;
height: 70px;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
text-decoration: none;
text-transform: uppercase; }
a.arrow:hover {
background: #0d6e9b;
padding: 0 40px 0 30px; }
a.arrow:hover:before, a.arrow:hover:after {
background: #0d6e9b; }
a.arrow:before, a.arrow:after {
background: #015880;
content: '';
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
height: 70px;
position: absolute;
top: 0; }
a.arrow:before {
mask: url("http://f.cl.ly/items/123R0o2q2V0y1b393R1t/button-left.svg");
-webkit-mask-image: url("http://f.cl.ly/items/123R0o2q2V0y1b393R1t/button-left.svg");
width: 21px;
left: -21px; }
a.arrow:after {
mask: url("http://f.cl.ly/items/343c47433k213o3a091O/button-right.svg");
-webkit-mask-image: url("http://f.cl.ly/items/343c47433k213o3a091O/button-right.svg");
width: 25px;
right: -25px; }
</style>
<a href="" title="Join the Club" class="arrow">Join the Club</a>