[英]How do I make the button have rounded corners while still doing the animation?
[英]how do I make rounded corners on hovers?
我正在为wordpress制作一个主题。 我的导航栏有像苹果网站一样的圆角。 我想为它添加一个悬停样式,但我无法让它悬浮在圆角上,就像苹果的导航栏一样。 我正在使用大图像作为背景并使用wordpress 3的菜单系统。 那么,我怎样才能将第一个和最后一个项目悬停在栏上? 谢谢你的帮助。
使用javascript,您可以选择和更改您想要的任何内容,但如果您只想使用css,则必须将:hover
应用于所有按钮子元素的父级,以便您可以使用css选择所有子元素。 但是,它排除了旧版本的IE,因为它们不支持:hover
在标签以外a
元素上。
例:
.button:hover {
//
}
.button:hover .main_section {
// change to main section of button on hover
}
.button:hover .left_part {
// change to left side on hover
}
.button:hover .right_part {
// change to right side on hover
}
您必须为“悬停”样式设置不同的背景图像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.