1
我有一個項目,並希望對div做動態效果,當用戶懸停div。 我想使用css3的這種效果,但我有溢出顏色問題與懸停的股利。懸停溢出div
請幫我解決問題。 我的代碼是在這裏
.product-box a:hover .prodiv2:before
{
\t content:"";
\t background:rgba(247,146,45,0.6);
\t display:block;
\t width:100%;
\t height:100%; z-index:1;
\t position:absolute;
\t left:0;
\t top:0;
\t margin-right:100px !important;
\t margin:0 auto !important;
}
.prodiv2 img
{
\t width:100% !important;
}
<!DOCTYPE Html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-6 rowm">
<div class="product-box">
<a href="continuous_parison.php">
\t \t <div class="prodiv2">
\t \t \t \t \t <img src="http://aew.worldwebinfotech.in/images/card1.jpg" alt="" class="img-responsive"> \t \t \t \t \t \t \t \t \t
\t \t \t \t \t <div class="prodiv3">
\t \t \t \t \t <h2>Continuous<br>Parison Series</h2>
\t \t \t \t \t <p>Ranging from : 200 ML -5000ML</p>
\t \t \t \t \t <button class="link-icon">View</button>
</div>
\t \t \t \t </div>
\t \t \t \t </a>
\t \t \t </div>
\t \t </div>
\t \t <div class="col-md-4 col-sm-6 rowm">
\t \t \t <div class="product-box">
\t \t \t \t <a href="deflashing_machine.php">
\t \t \t \t \t <div class="prodiv2">
\t \t \t \t \t \t <img src="http://aew.worldwebinfotech.in/images/card1.jpg" alt="" class="img-responsive">
\t \t \t \t \t \t <div class="prodiv3">
\t \t \t \t \t \t \t <h2>Auto Deflashing<br>Series</h2>
\t \t \t \t \t \t \t <p>Ranging from : 200ML- 5LTR</p>
\t \t \t \t \t \t \t <button class="link-icon">View</button>
\t \t \t \t \t \t </div>
\t \t \t \t \t </div>
\t \t \t \t </a>
\t \t \t </div>
\t \t </div>
\t </div>
</div>
</body>
</html>
你要懸停只爲圖像添加該代碼在你的CSS? – user7357089
不,我想懸停所有,但我想從左側和右側刪除多餘的顏色 – Khetaram