【发布时间】:2011-04-02 12:25:53
【问题描述】:
我有一些 CSS,当你将鼠标悬停在它们上面时,它会导致图像弹出一点:
a img
{
-webkit-transition: -webkit-transform 0.3s ease;
-moz-transition: -moz-transform 0.3s ease;
-o-transition: -o-transform 0.3s ease;
transition: transform 0.3s ease;
}
a:hover img
{
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
-o-transform: scale(1.2);
transform: scale(1.2);
-webkit-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
-o-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
}
问题是这适用于所有图像,包括我的横幅。无论如何要排除横幅图片吗?
【问题讨论】:
-
谢谢大家,您的所有回答都很有帮助。我决定现在继续使用 :not()。