【发布时间】:2017-03-18 07:19:04
【问题描述】:
基本上,
我有一个渐变条,当 USP 悬停在条下方时,渐变会移动到带有三角形的 USP 上方。现在我想弄清楚如何在悬停时让 SVG 的中心在 USP 内部居中,以使渐变看起来也有一个三角形。下面是一个有点硬的截图和codepen。
http://codepen.io/nsmed/pen/MpOLpp?editors=1100
<section class="small-business-split-header-block">
<div class="wrapper">
<h1 class="small-business-header">Your calls<br />answered brilliantly</h1>
<p class="small-business-sub-header">Our small business services ensure you capture every opportunity and make your business look bigger. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sit amet semper ante. Ut vel odio.</p>
</div><!--wrapper-->
<div class="usp-bar">
<p class="usp-one active">Telephone Answering</p>
<span><img src="http://svgshare.com/i/y4.svg" /></span>
</div><!--usp-bar-->
</section>
<div class="usp-list cf">
<div class="usp active">
<a href="#">
<p>Need your own<br /><strong>dedicated PA?</strong></p>
</a>
</div><!--usp-->
<div class="usp">
<a href="#">
<p>Looking for<br />an auto attendent?</p>
</a>
</div><!--usp-->
<div class="usp">
<a href="#">
<p>Missing calls<br />on your mobile?</p>
</a>
</div><!--usp-->
<div class="usp">
<a href="#">
<p>Looking for a<br />business number?</p>
</a>
</div><!--usp-->
</div><!--usp-list-->
【问题讨论】:
-
换句话说,您试图使三角形与“电话接听” div 的渐变相匹配?这样它们看起来就像是相同的形状?
-
是的,这是一种更好的解释方式
-
你解决了吗?
标签: javascript jquery html css svg