在WordPress中仅使用custom.css替换菜单中的项目 [英] Replace item in menu using only custom.css in WordPress

查看:122
本文介绍了在WordPress中仅使用custom.css替换菜单中的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,菜单看起来像:





是否可以使用custom.css替换菜单中的这个项目?我只是想在另一张照片上替换这张照片。是否有可能通过只使用custom.css,或者我需要访问文件并在这里​​使用java脚本?



链接到我的网站: http://test.projekt-tenis.pl/wordpress/

解决方案

给这个旋转:

  .is-sticky img.menu -image-title-hide {
background:url(http://www.spiritvoyage.com/blog/wp-content/uploads/Screen-shot-2011-12-06-at-2.56.08-PM -150x150.png)无重复;
width:150px;
height:150px;
padding-left:150px;
}

应该这样做。它将原始的src图像移开并添加背景图像。就您的用户而言,它只会看起来像从一幅图像翻转到另一幅图像。



它的工作原理是,.is-sticky类通过js滚动添加到标题中。


I would like to replace this image when I scroll down on another image.

Firstly, the menu looks like:

And when I scroll little bit down menu looks like:

Is it possible to replace using custom.css this item in menu? I just want to replace this picture on another picture. Is it possible to do by using only custom.css or do I need to have acces to files and use here java script?

When it's possible can somene just tell how?

Link to my site : http://test.projekt-tenis.pl/wordpress/

解决方案

Give this a whirl:

.is-sticky img.menu-image-title-hide {
    background: url(http://www.spiritvoyage.com/blog/wp-content/uploads/Screen-shot-2011-12-06-at-2.56.08-PM-150x150.png) no-repeat;
    width: 150px;
    height: 150px;
    padding-left: 150px;
}

Should do the trick. It moves the original src image out of the way and adds a background image. As far as your user is concerned it'll just look like it flips from one image to the other.

It works because the class .is-sticky is added to the header on scroll by js.

这篇关于在WordPress中仅使用custom.css替换菜单中的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆