在为我的图像添加一个悬停功能时,我正在尝试的文件最终与我所有其他部分的圆圈外观不匹配。
这是一个叫做协同工作,没有悬停的部分的代码。下面是一个名为虚拟办公室的部分的代码,带有一个悬停。
<li>
<img class="alignnone wp-image-241 size-thumbnail"
src="https://liveprimary.com/wp-content/uploads/2017/03/coworking_dark-1-300x300.jpg"
alt="" width="300" height="300" />
</a>
<h4>Coworking
</a>Starting at $300
</h4>
</li>
<li>
<a href="http://staging.liveprimary.com/virtual-memberships/">
<img class="alignnone wp-image-242 size-thumbnail"
src="http://staging.liveprimary.com/wp-content/uploads/2017/06/offices_dark.jpg"
onmouseover="this.src='http://staging.liveprimary.com/wp-content/uploads/2018/03/offices_light.jpg'"
onmouseout="this.src='http://staging.liveprimary.com/wp-content/uploads/2017/06/offices_dark.jpg'"
alt="" width="300" height="300"
/>
</a>
<h4>
<a data-open="modal-virtual-memberships">Virtual Office
</a>Starting at $80
</h4>
</li>
当显示在网站上,合作和虚拟办公室的圆圈格式是不同的大小。
我试图调整虚拟办公室部分的宽度和高度,但是它没有工作。
分期站点:http://staging.liveprimary.com/membership/密码(如果问):Pr1m@ry!
有什么想法吗?我非常感谢你的帮助!
发布于 2018-03-08 08:12:36
这一问题之所以发生,是因为您已经调用了完整(大)图像路径。请用这个代替。
光:light-300x300.jpg
黑暗:dark-300x300.jpg
发布于 2018-03-08 08:01:10
这是因为您的virtual office's circle img
大小不同。它的宽度和高度并不相等。
所有其他img siz
都是相同的300*300
。
当您尝试创建circle img
时,最好使用same width and height images
,这是代码方法。
https://stackoverflow.com/questions/49167321
复制相似问题