Html 图像库工作不正常
我有一个3个冒号x 4行画廊中12幅图像的未排序列表。 悬停时,将应用变换比例Html 图像库工作不正常,html,css,css-selectors,Html,Css,Css Selectors,我有一个3个冒号x 4行画廊中12幅图像的未排序列表。 悬停时,将应用变换比例 section#gallery{ Width:670px; } section#gallery ul li{ display:inline;} section#gallery ul li img{ width: 215px; height:150px; border: 2px solid #fff; margin: 5px 0px 0px 0px; -webkit-tra
section#gallery{
Width:670px;
}
section#gallery ul li{
display:inline;}
section#gallery ul li img{
width: 215px;
height:150px;
border: 2px solid #fff;
margin: 5px 0px 0px 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;}
}
section#gallery ul li img:hover {
-webkit-transform:scale(2) ;
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-box-shadow:1px 1px 2px 1px #999999;
}
如何将(3n+1)图像(图像1-4-7-10)的变换原点设置为左侧
第三个(3-6-9-12)元素在右边
section#gallery{
Width:670px;
}
section#gallery ul li{
display:inline;}
section#gallery ul li img{
width: 215px;
height:150px;
border: 2px solid #fff;
margin: 5px 0px 0px 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;}
}
section#gallery ul li img:hover {
-webkit-transform:scale(2) ;
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-box-shadow:1px 1px 2px 1px #999999;
}
我试图在这里输入html和css,但收到了错误消息。您没有为变换原点指定所需的
y
值(因此我认为是0
),但是如果您对图像应用比例,这应该会起作用(为特定供应商添加前缀)
section#gallery{
Width:670px;
}
section#gallery ul li{
display:inline;}
section#gallery ul li img{
width: 215px;
height:150px;
border: 2px solid #fff;
margin: 5px 0px 0px 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;}
}
section#gallery ul li img:hover {
-webkit-transform:scale(2) ;
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-box-shadow:1px 1px 2px 1px #999999;
}
这是代码,我想如何通过css格式化它
section#gallery{
Width:670px;
}
section#gallery ul li{
display:inline;}
section#gallery ul li img{
width: 215px;
height:150px;
border: 2px solid #fff;
margin: 5px 0px 0px 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;}
}
section#gallery ul li img:hover {
-webkit-transform:scale(2) ;
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-box-shadow:1px 1px 2px 1px #999999;
}
我在网站vsio.ru上放了一个草稿工作示例
section#gallery{
Width:670px;
}
section#gallery ul li{
display:inline;}
section#gallery ul li img{
width: 215px;
height:150px;
border: 2px solid #fff;
margin: 5px 0px 0px 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;}
}
section#gallery ul li img:hover {
-webkit-transform:scale(2) ;
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-box-shadow:1px 1px 2px 1px #999999;
}
我要第四个七。。。。(3n+1)悬停时的图像要大2倍[tranform:scale(2)]
将变换原点集设置为左侧,将第三个第6个第9个……(3n)变换原点集设置为右侧
section#gallery{
Width:670px;
}
section#gallery ul li{
display:inline;}
section#gallery ul li img{
width: 215px;
height:150px;
border: 2px solid #fff;
margin: 5px 0px 0px 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;}
}
section#gallery ul li img:hover {
-webkit-transform:scale(2) ;
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-box-shadow:1px 1px 2px 1px #999999;
}
(是否可能将伪类(HOVER)应用于伪元素(n-CHILD)?以及如何应用?)
section#gallery{
Width:670px;
}
section#gallery ul li{
display:inline;}
section#gallery ul li img{
width: 215px;
height:150px;
border: 2px solid #fff;
margin: 5px 0px 0px 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;}
}
section#gallery ul li img:hover {
-webkit-transform:scale(2) ;
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-box-shadow:1px 1px 2px 1px #999999;
}
`
section#gallery{
Width:670px;
}
section#gallery ul li{
display:inline;}
section#gallery ul li img{
width: 215px;
height:150px;
border: 2px solid #fff;
margin: 5px 0px 0px 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;}
}
section#gallery ul li img:hover {
-webkit-transform:scale(2) ;
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-box-shadow:1px 1px 2px 1px #999999;
}
`问题解决了吗?
section#gallery{
Width:670px;
}
section#gallery ul li{
display:inline;}
section#gallery ul li img{
width: 215px;
height:150px;
border: 2px solid #fff;
margin: 5px 0px 0px 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;}
}
section#gallery ul li img:hover {
-webkit-transform:scale(2) ;
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
-webkit-box-shadow:1px 1px 2px 1px #999999;
}