jquery - Issue with hover over image as link -
i trying reach effect once hover on image change color , once click on , redirect requested page ,so use a href. tried css img:hover didn't work. images png . using bootstrap website responsive.
my html:
@extends ('master') @section('content') <div class="row"> <div class="col-md-12"> <h1 class="text-center">myhero shop</h1> <br><br> </div> </div> <div class="row"> @if ($categories) @foreach($categories $category) <div class="col-md-4 col-sm-6 text-center"> <h3 >{{ $category['title'] }} </h3> <p class><a href="{{ url('shop/'. $category['url']) }}" class="categorieimg"><img width="250" src="{{ asset('images/' . $category['image']) }}"></a></p> <p>{!! $category['article']!!}</p> </div> @endforeach @else <div class="col-md-12"> <br><br> <p class="text-center" style="font-size: 18px"><b>no categories found...</b></p> <div @endif </div> @endsection css: .categorieimg:hover{ background-color: #080808; }
img { -webkit-filter: grayscale(100%); filter: grayscale(100%); } img:hover { -webkit-filter: none; filter: none; }
<a href="https://www.w3schools.com/cssref/css3_pr_filter.asp"> <img src="https://www.w3schools.com/cssref/pineapple.jpg" /> </a>
Comments
Post a Comment