如何禁用鼠标悬停功能h标签区域和png图标

时间:2016-12-22 11:41:22

标签: mouseover

大家好我有问题。我希望在图像上显示正常的文字。当我做mouseover时应该更改图像不透明度,除了我的文字和png图标,它应该是正常的(没有不透明度)。就像那样。感谢http://demo.digipieces.com/gusteau-html/menu-1.html



.foodMenu {
	text-align: center;
	height: 210px;
	width: 280px;
	position: relative;
	}
	
.foodMenu:after {
	content:'\A';
	position:absolute;
	background:rgba(0,0,0,0.6);
	opacity:0;
    transition: all 0.5s;
    -webkit-transition: all 0.5s;
	top:0; 
	left:0;
	width:100%; height:100%;
	}
	
.foodMenu:hover:after {
	opacity: 1;
	}
	
	
.foodMenu .menuTitle {
	font-weight: 300;
	font-size: 32px;
	text-align: center;
	text-transform: none;
	position: absolute; 
    bottom:30px; 
    left:0;
    right:0;
	transition:all 0.4s ease-in-out;
    -webkit-transition:all 0.4s cubic-bezier(x1,y1,x2,y2);  
	text-rendering: optimizelegibility;
	opacity: 0;
	}
	
.foodMenu:hover .menuTitle {
	opacity: 1;   
	bottom: 70px;
	}

.foodMenu .curve {
	text-align: center;
	text-transform: none;
	position:absolute;
    bottom:70px; 
    left:120px;
    right:0;
	opacity:0;  
	transition:all 0.4s ease-in-out;
    -webkit-transition:all 0.4s;  
	}
	
.foodMenu:hover .curve {
	opacity: 1;
	}

<div class="col span-1-of-4 step_box">
  <div class="foodMenu js-wp-2">
    <img src="http://lorempixel.com/output/food-q-c-280-210-1.jpg" alt="our menu meal">
    <h3 style="color:#ffffff;" class="menuTitle">Meals</h3>
    <img src="img/curve.png" alt="curve" class="curve">
  </div>
</div>
&#13;
&#13;
&#13;

0 个答案:

没有答案