jquery - How to mask out a section of a div to see behind it? -


i'm looking way mask out part of div behind visible.

looking @ example, replace black circle sort of mask, slides down text being revealed (or background image) can seen behind it.

jsfiddle

jquery(document).ready(function() {     $('.img').click(function() {         $('.mid').slidetoggle('slow');     }); }); 

if want use css, there creative solution problem. seperate horizontal part "black hole" others 3 parts: left of circular hole, hole, , right part. in hole part put div no background , border suitable border radius. fixed width , height measurements, further seperation should no trouble.

best example how whale : http://www.subcide.com/experiments/fail-whale/

this applicable chomre 4.0+, ie 9+, firefox 3+, safari 3.1 , 5 opera 10.5 make sure include corresponding prefixes (-moz- , -webkit-)


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -