Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS鼠标左移不';我不能正常工作_Css_Transition - Fatal编程技术网

CSS鼠标左移不';我不能正常工作

CSS鼠标左移不';我不能正常工作,css,transition,Css,Transition,我正在尝试缩放和降低图像的不透明度。当我用光标进入img时,效果非常好,但当我离开img时,转换不起作用 这是我的密码: #hoverCon:hover img { transform: scale(1.2); opacity: 0.5; transition: all .28s ease-out; } 你应该写 #hoverCon img { transform : scale(1); /* optional */ opacity : 1;

我正在尝试缩放和降低图像的不透明度。当我用光标进入img时,效果非常好,但当我离开img时,转换不起作用

这是我的密码:

#hoverCon:hover img {
  transform: scale(1.2);
  opacity: 0.5;
  transition: all .28s ease-out;
}
你应该写

#hoverCon img {
  transform  : scale(1);   /* optional */
  opacity    : 1;          /* optional */
  transition : all .28s ease-out;
}

#hoverCon:hover img {
  transform  : scale(1.2);
  opacity    : 0.5;
}
定义基本属性(可选)并在正常状态下转换,然后仅在
悬停

例如: