Css 背景img响应设计
我尝试在背景图像上使用悬停,如下所示:Css 背景img响应设计,css,twitter-bootstrap,responsive-design,Css,Twitter Bootstrap,Responsive Design,我尝试在背景图像上使用悬停,如下所示: .featuredimg{background: url('[imgPathHere]'); width:370px; height:430px;} .featuredimg:hover{background: url('[imgPathHere]')0px -430px;} 问题是,我正在使用twitter引导,以便该站点能够响应。如何在允许图像缩放的同时继续使用背景img悬停。现在,无论窗口大小如何
.featuredimg{background: url('[imgPathHere]');
width:370px;
height:430px;}
.featuredimg:hover{background: url('[imgPathHere]')0px -430px;}
问题是,我正在使用twitter引导,以便该站点能够响应。如何在允许图像缩放的同时继续使用背景img悬停。现在,无论窗口大小如何,图像都保持相同的宽度和高度。使用:before/:after或background size属性来缩放背景图像。您的意思是用
z-index
堆叠它们,并在悬停状态下显示父图像吗?@jtheman真的吗?你不能?