snipt

Ctrl+h for KB shortcuts

CSS

Helvetica + Ampersand Class

1
2
3
4
5
6
7
8
font-family: 'Helvetica Neue', 'HelveticaNeue', Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;

.ampersand {
	font-family: 'Baskerville', 'Palatino', 'Hoefler Text', serif;
	font-size: 1.2em;
	font-style: italic;
}
https://snipt.net/embed/7534e98d75384ca2c5f85c88ee841513/
/raw/7534e98d75384ca2c5f85c88ee841513/
7534e98d75384ca2c5f85c88ee841513
css
CSS
8
2019-07-15T17:21:32
True
False
False
/api/public/snipt/18604/
helvetica-ampersand-class
<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> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">font-family</span><span class="o">:</span> <span class="s1">&#39;Helvetica Neue&#39;</span><span class="o">,</span> <span class="s1">&#39;HelveticaNeue&#39;</span><span class="o">,</span> <span class="nt">Helvetica</span><span class="o">,</span> <span class="nt">Arial</span><span class="o">,</span> <span class="nt">sans-serif</span><span class="o">;</span> </span><span id="L-2"><a name="L-2"></a> <span class="nt">-webkit-font-smoothing</span><span class="o">:</span> <span class="nt">antialiased</span><span class="o">;</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="nc">.ampersand</span> <span class="p">{</span> </span><span id="L-5"><a name="L-5"></a> <span class="nb">font-family</span><span class="o">:</span> <span class="s1">&#39;Baskerville&#39;</span><span class="o">,</span> <span class="s1">&#39;Palatino&#39;</span><span class="o">,</span> <span class="s1">&#39;Hoefler Text&#39;</span><span class="o">,</span> <span class="nb">serif</span><span class="p">;</span> </span><span id="L-6"><a name="L-6"></a> <span class="nb">font-size</span><span class="o">:</span> <span class="m">1.2em</span><span class="p">;</span> </span><span id="L-7"><a name="L-7"></a> <span class="nb">font-style</span><span class="o">:</span> <span class="nb">italic</span><span class="p">;</span> </span><span id="L-8"><a name="L-8"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
css, neat, typography

JavaScript

Detección de objetos

1
2
3
4
5
6
7
function getClassName(klass){
	if (document.getElementsByClassName) {
		return document.getElementsByClassName(klass);
	} else {
		// código alternativo.
	}
}
https://snipt.net/embed/f420ded865596639632bbb14bdb0bdd3/
/raw/f420ded865596639632bbb14bdb0bdd3/
f420ded865596639632bbb14bdb0bdd3
js
JavaScript
7
2019-07-15T17:20:37
True
False
False
/api/public/snipt/2567/
deteccion-de-objetos
<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><span class="kd">function</span> <span class="nx">getClassName</span><span class="p">(</span><span class="nx">klass</span><span class="p">){</span> </span><span id="L-2"><a name="L-2"></a> <span class="k">if</span> <span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByClassName</span><span class="p">)</span> <span class="p">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">return</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByClassName</span><span class="p">(</span><span class="nx">klass</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span> </span><span id="L-5"><a name="L-5"></a> <span class="c1">// código alternativo.</span> </span><span id="L-6"><a name="L-6"></a> <span class="p">}</span> </span><span id="L-7"><a name="L-7"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
dom, javascript, web