googletag.cmd.push(function() { googletag.display('div-gpt-ad-1422003450156-2'); });
Colors HEX
❮ Previous
Next ❯
Hex Calculator
rgb(255, 0, 0)#000000
hsl(0, 0%, 0%)
Hexadecimal Colors
Hexadecimal color values are also supported in all browsers.
A hexadecimal color is specified with: #RRGGBB.
RR (red), GG (green) and BB (blue) are hexadecimal integers between 00 and
FF specifying the intensity of the color.
For example, #0000FF is displayed as blue, because the blue component is set to its highest value (FF) and the others are set to
00.
function submitOnEnter(e) {
keyboardKey = e.which || e.keyCode;
if (keyboardKey == 13) {
setFullColor();
}
}
function numberValue(elmnt) {
var val, x;
val = Number(elmnt.value);
if (val 255) {val = 255;}
val = toHex(val);
x = document.getElementById(elmnt.id.substr(0, 3));
x.value = val;
setColor();
}
function toHex(n) {
var hex = n.toString(16);
while (hex.length < 2) {hex = "0" + hex; }
return hex;
}
function clickRed(red) {
var r = document.getElementById("r01");
r.value = red;
setColor();
}
function clickGreen(green) {
var g = document.getElementById("g01");
g.value = green;
setColor();
}
function clickBlue(blue) {
var b = document.getElementById("b01");
b.value = blue;
setColor();
}
function drawRedTable() {
var x, i, n, g, b;
g = "00";
b = "00";
x = "
"
x += "";
n = 0;
for (i = 0; i <= 255; i++) {
n = toHex(i);
x += "
Popular posts from this blog
<!-- main_leaderboard, all: [728,90][970,90][320,50][468,60] --> Bootstrap Pagination ❮ Previous Next ❯ Basic Pagination If you have a web site with lots of pages, you may wish to add some sort of pagination to each page. A basic pagination in Bootstrap looks like this: 1 2 3 4 5 To create a basic pagination, add the .pagination class to an <ul> element: Example <ul class="pagination"> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> </ul> Try it Yourself » Active State The active state shows what is the current page: 1 2 3 4 5 Add class .active to let the user know which page he/she is on: Example <ul cla...
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1422003450156-2'); }); Bootstrap JS Affix ❮ Previous Next ❯ JS Affix (affix.js) The Affix plugin allows an element to become affixed (locked) to an area on the page. This is often used with navigation menus or social icon buttons, to make them "stick" at a specific area while scrolling up and down the page. The plugin toggles this behavior on and off (changes the value of CSS position from static to fixed), depending on scroll position. The affix plugin toggles between three classes: .affix , .affix-top , and .affix-bottom . Each class represents a particular state. You must add CSS properties to handle the actual positions, with the exception of position:fixed on the .affix class. For more information, read our Bootstrap Affix Tutorial. Tip: The Affix plugin is often used together with the Scrollspy plugin. Via data-* Attributes Add data-spy="aff...
<!-- main_leaderboard, all: [728,90][970,90][320,50][468,60] --> SVG in HTML ❮ Previous Next ❯ In HTML5, you can embed SVG elements directly into your HTML pages. Embed SVG Directly Into HTML Pages Here is an example of a simple SVG graphic: Sorry, your browser does not support inline SVG. and here is the HTML code: Example <!DOCTYPE html> <html> <body> <h1>My first SVG</h1> <svg width="100" height="100"> <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /> </svg> </body> </html> Try it Yourself » SVG Code explanation: An SVG image begins with an <svg> element The width and height attributes of the <svg> element define the width and height of the SVG image The <circle> element is used to draw a circle The cx and cy attributes define the x and y co...
|