Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

Text only

CIRCLE IMAGE SIMPLE

1
2
3
4
5
6
7
.img-circle {
    border-radius: 50%;
}

Now any image with the img-circle class will be displayed as a perfect circle:

<img class="img-circle" src="kitten.jpg">
https://snipt.net/embed/14f7751b5d61be4d632534297219db3e/
https://snipt.net/raw/14f7751b5d61be4d632534297219db3e/
14f7751b5d61be4d632534297219db3e
text
Text only
7
2016-12-05T15:58:20
True
False
False
Sep 26, 2015 at 06:16 PM
/api/public/snipt/141251/
circle-image-simple
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>.img-circle { </span><span id="L-2"><a name="L-2"></a> border-radius: 50%; </span><span id="L-3"><a name="L-3"></a>} </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>Now any image with the img-circle class will be displayed as a perfect circle: </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a>&lt;img class=&quot;img-circle&quot; src=&quot;kitten.jpg&quot;&gt; </span></pre></div> </td></tr></table>
circle, css, image

CSS

circle

1
2
3
4
5
6
.circle {
	border-radius: 50%;
	width: 200px;
	height: 200px; 
	/* width and height can be anything, as long as they're equal */
}
https://snipt.net/embed/dd5d4f4bcfbb0531d58bbb84729e1ba1/
https://snipt.net/raw/dd5d4f4bcfbb0531d58bbb84729e1ba1/
dd5d4f4bcfbb0531d58bbb84729e1ba1
css
CSS
7
2016-12-06T05:43:22
True
False
False
Aug 06, 2012 at 05:55 AM
/api/public/snipt/45240/
circle-2
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nc">.circle</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">border</span><span class="o">-</span><span class="n">radius</span><span class="o">:</span> <span class="m">50%</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nb">width</span><span class="o">:</span> <span class="m">200px</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="nb">height</span><span class="o">:</span> <span class="m">200px</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a> <span class="c">/* width and height can be anything, as long as they&#39;re equal */</span> </span><span id="L-6"><a name="L-6"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
circle, css3
Copyrighted, illegal, or inappropriate content? Email [email protected].