rplus.github.io
rplus.github.io copied to clipboard
[POST] CSS clip-path & SVG clipPath 的有趣搭配
An awesome HTML & CSS game!
http://victordarras.fr/cssgame/ #css form @victordarras

with creative clip-path & svg fragment
又看到鬼神般的 CSS 應用方式了 XDDDD
用 CSS clip-path 這玩意搭配 SVG clipPath 切割元素的作用範圍

而 hover 就出局的 css 很簡單不需多言
如果想實驗切割後的作用範圍, 可以先把 animation 停掉、game-over 那層加上 pointer-event none 就能比較方便地體驗到被切過不規則的元素邊界~ 非常神奇~
clip-path 支援度:
http://caniuse.com/#feat=css-clip-path
- IE 全滅!!
- 需注意 webkit 對 shapes 的支援僅在 inline SVG,
external SVG 會 GG 的~
作者寫了篇法文的教學~ ( 看不懂法文 XDDD http://www.synbioz.com/blog/css_shape_et_mini_jeu
tw: https://twitter.com/RplusTW/status/691386704276492288 fb: https://www.facebook.com/rplus.tw/posts/1048959781838471