Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've created a JsFiddle for you. What i have done is to create a pointer on the side of the Div (purely with CSS - exactly as your black box looks like) and also change where it is pointing with JQuery.</p> <p><a href="http://jsfiddle.net/Vn6Qm/1/" rel="nofollow">JsFiddle</a></p> <p>Tell me if this is what you are looking for.</p> <pre><code>Hope this works for you </code></pre> <p>Cheers</p> <p>EDIT: I have edited the fiddle for you. <a href="http://jsfiddle.net/Vn6Qm/2/" rel="nofollow">New Fiddle</a> . I am not able to create exactly what you want so i have done the second best possible solution here. I gave to the triangle a light color with opacity that will give the illusion its transparent. The problem is that i've created the triangle with the use of borders. You can't set border ...for a border (in order to have the "filling" of the triangle as transparent).</p> <p>CSS</p> <pre><code>#pointingDiv { margin:20px; width: 500px; height: 350px; position: relative; background:url('http://thatgamecompany.com/wp-content/themes/thatgamecompany/_include/img/flower/flower-game-screenshot-2.jpg'); background-size: cover; } #pointingDiv:before { content:""; position: absolute; right: 100%; top: 20px; width: 0; height: 0; border-top: 8px solid transparent; border-right: 15px solid rgba(255, 255, 0, .2); border-bottom: 8px solid transparent; background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */ background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */ } </code></pre> <p>HTML</p> <pre><code>&lt;div id="pointingDiv"&gt; &lt;/div&gt; &lt;p&gt;Click here to change the pointer's location&lt;/p&gt; </code></pre> <p>JS (include JQuery)</p> <pre><code>$('p').one('click',function(){ $('head').append('&lt;style&gt;#pointingDiv:before{top: 50px;}&lt;/style&gt;'); }); </code></pre> <p>I personally don't think there is a way out of this exept if you are willing on cropping the images a bit on the left side and use a bit too much javascript.</p> <p>Good luck</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload