Skip to content

Instantly share code, notes, and snippets.

@WebPlatformDocs
Forked from rishabh-ink/dabblet.css
Created May 7, 2013 19:24
Show Gist options
  • Save WebPlatformDocs/5535397 to your computer and use it in GitHub Desktop.
Save WebPlatformDocs/5535397 to your computer and use it in GitHub Desktop.
CSS border-right-color example
/**
* CSS border-right-color example
* http://docs.webplatform.org/wiki/css/properties/border-right-color
*/
body {
margin: 0 auto;
width: 80%;
}
h1 {
font-size: 1em;
}
.box {
border: 5px solid #efefef;
/* Extra styling for decoration. */
font: 1em sans-serif;
color: #444;
text-shadow: 0 1px #dedede;
width: 200px;
height: 80px;
margin: 10px 10px;
padding: 10px;
border-radius: 20px;
text-align: center;
float: left;
}
.named-value {
border-right-color: red;
}
.hex-value {
border-right-color: #FD6C02;
}
.rgb-value {
border-right-color: rgb(255, 255, 0);
}
.rgb-percentage-value {
border-right-color: rgb(0%, 100%, 0%);
}
.hsl-value {
border-right-color: hsl(240, 100%, 50%);
}
.rgba-value {
border-right-color: rgba(75, 0, 130, 0.8);
}
.hsla-value {
border-right-color: hsla(282, 100%, 41%, 0.8);
}
<div class="box named-value">
<h1>Named color</h1>
<p><code>red</code></p>
</div>
<div class="box hex-value">
<h1>Hexadecimal color</h1>
<p><code>#FD6C02</code></p>
</div>
<div class="box rgb-value">
<h1>RGB color</h1>
<p><code>rgb(255, 255, 0)</code></p>
</div>
<div class="box rgb-percentage-value">
<h1>RGB percentage color</h1>
<p><code>rgb(0%, 100%, 0%)</code></p>
</div>
<div class="box hsl-value">
<h1>HSL color</h1>
<p><code>hsl(240, 100%, 50%)</code></p>
</div>
<div class="box rgba-value">
<h1>RGB with alpha color</h1>
<p><code>rgba(75, 0, 130, 0.8)</code></p>
</div>
<div class="box hsla-value">
<h1>HSL with alpha color</h1>
<p><code>hsla(282, 100%, 41%, 0.8)</code></p>
</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment