html - Clip path polygon css in not working in firefox and internet explorer -


i wan cut image right bottom , done not working in browser. there way this?


note:

hover effect necessary.


here code.

.clip>a>img{  	-webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 73% 100%);  }  .clip>a>img:hover{  	-webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%);  }
<html>    <head>    <title></title>  </head>      <body>  <div class="clip">  <a href="#">  <img src="https://farm4.staticflickr.com/3165/5733278274_2626612c70.jpg">  </a>  </div>  </body>    </html>

thank you.

in short: doesn't work there because using css properties don't belong (firefox's , ie's) rendering engine.

look @ question here see informative discussion it. gist is: webkit opera rendering engine, , works in chrome because chrome's rendering engine (gecko) based on webkit.

from looking @ this css-tricks post seems best support should add css rule without -webkit-, it still not have support across browsers (look @ final paragraph browser-support summary in post):

.clip>a>img{     -webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 73% 100%);     clip-path: polygon(0 100%, 0 0, 100% 0, 73% 100%); } .clip>a>img:hover{     -webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%);     clip-path: polygon(0 100%, 0 0, 100% 0, 100% 100%); } 

just reiterate: not fix problem ie , firefox, don't support clip-path property yet. can see browser support here.

possible solution

apart not doing clipping in ie , firefox, can cut rectangular shape fallback in ie , firefox - can use deprecated

clip: rect(10px, 20px, 30px, 40px); 

look in post linked above - it's first thing there. writes there- it's limited (the image has absolutely positioned , can use rectangles, supported browsers it's fall-back). if can fallback-design it's worth knowing.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -