Thursday, 12 December 2013

Exploring canvas drawing techniques

Free Drawing in <canvas>

In html
<canvas id="c" width="500" height="300"></canvas>

In CSS
canvas{ border: 1px solid #ccc; }

In JS

var el = document.getElementById('c');
var ctx = el.getContext('2d');
var isDrawing;
el.onmousedown = function(e) {
  isDrawing = true;
  ctx.moveTo(e.clientX, e.clientY);
};
el.onmousemove = function(e) {
  if (isDrawing) {
    ctx.lineTo(e.clientX, e.clientY);
    ctx.stroke();
  }
};
el.onmouseup = function() {
  isDrawing = false;
};

BASIC

Editor link

For all drawing techniques 

Monday, 9 December 2013

Stop Cooking Live Animals In China

Putting a live dog, or any animal, in boiling water, or a hot oven, or using a blow torch on cats, is not only blatantly wrong, without further explanation---but if one is necessary it is TORTURE. 

The 'reason' that is given for cooking animals alive is that they simply "taste better" after their bodies are adrenaline-soaked with fear and pain. 'Taste' is never an excuse for unspeakable cruelty, nor is 'culture' an excuse. 

China is making so many strides to become a first world country, but with all due respect, with this kind of accepted culinary method, China AND Korea will be looked upon as backward nations by the rest of the civilized world (one foot in the 21st century and one foot in a primitive age). 

Any animal placed in boiling water or cooked, while still alive, in any manner is obviously terrified, in unimaginable pain, despair and doomed to a slow and lingering death. Animals in the food chain should, at the very least, be given the most humane death possible.


Save Animals

The Shocking Truth Behind Snakeskin Fashions


Snakes are remarkable animals, but they have an unearned negative reputation. Some people have even come to fear these stunning animals, but in reality, 
snakes have more reasons to fear us.

Every year, at least 440,000 pythons are slaughtered in Indonesia, Malaysia, and Vietnam—just to be made into shoes and handbags! The real number is probably way higher because this number doesn’t include the thousands of illegally traded pythons who are exported annually.
Most are torn from their own homes deep in the jungles of Indonesia and Malaysia.


Once they are captured, their heads are often forced down and cut off with a machete. Others have their heads nailed to a tree and their skins slowly peeled off. Because of their slow metabolisms, snakes remain conscious and are able to feel pain and fear even after they have their heads cut off.


If they aren’t beheaded or nailed to a tree, they are beaten to death. Their jaws are forced open so that a tube can be jammed down their throats, then their bodies are pumped full of water to make their skins easier to remove. Ropes are tied tightly around their necks to prevent any fluid from escaping their bodies.



It can take up to 10 minutes for snakes to die.



Their bodies are slit open from end to end to loosen their once strong and protective skin.



Once the skin is limp, it is ripped from the snakes’ bodies. The snakes’ skins are no longer their own and are now the prized possessions of their captors. The skins are shipped off to tanneries to be treated with chemicals and sold to the fashion industry.




Many snakes are still alive as they are tossed into a pile of other snakes and left to die slowly. They often suffer for several days before dying from dehydration.

Snakes are not the only animals who suffer for fashion. Millions of lizards, alligators, crocodiles, and other reptiles are violently killed every year so that their skins can be torn from their bodies to make wallets, belts, boots, and handbags. Reptiles may be cold-blooded, but wearing their skins is cold-hearted.

Thursday, 5 December 2013

Thursday, 28 November 2013

HTML5 Element Index

Double-Colon for Pseudo-Elements


To differentiate between pseudo-elements and pseudo-classes, in CSS3 all pseudo-elements have a double-colon syntax. So instead of: :before, you do ::before.

All browsers are going to support the single-colon syntax, pretty much indefinitely, to abide by good design principles.

So that means we won’t be using the double-colon syntax until all browsers that don’t support it (including IE8, the current browser leader) are completely gone — which might not be for at least 2 or 3 years, and probably more.



( :root ) in css

The :root selector allow  you to target the highest-level 'Parent' element in the dom, or document.


We can take advantage of being able to apply CSS to the  <html> element to skip the wrapper div and keep our markup clean!



Browser Support for CSS3 Selectors


The Status of the ::selection Pseudo-element?

HTML5 Boilerplate put the ::selection pseudo-element on the map, so to speak, most CSS developers now a days have been including this selector as part of their universal styles.



HTML5 Element Index

Head Part
  • Doctype
  • Title
  • Base
  • Link
  • Meta
  • Style
  • Script
  • Noscript
Section
  • body
  • article
  • nav
  • aside
  • section
  • header
  • footer
  • h1-h6
  • main
  • address
Grouping
  • p
  • hr
  • pre
  • blockquote
  • ol
  • ul
  • li
  • dl, dt, dd
  • figure
  • figcaption
  • div
Tables
  • table
  • caption
  • thread
  • tbody
  • tfoot
  • tr, th, td
  • col, colgroup
Form
  • form
  • fieldset
  • legend
  • label
  • input
  • button
  • select
  • datalist
  • optgroup, option
  • textarea
Form 2 HTML5
  • keygen
  • output
  • progress
  • meter
  • detail
  • summary
  • command
  • menu
Embedded
  • img
  • iframe
  • embed
  • object
  • param
  • video
  • audio
  • source 
  • canvas
  • track
  • map
  • area
Text-level
  • a
  • em
  • strong
  • i, b
  • u
  • a
  • small
  • abbr
  • q
  • site
  • dfn
  • sub, sup
Text-level 2 HTML5
  • time
  • code
  • kdb
  • samp
  • var
  • mark
  • bdi
  • bdo
  • ruby, rt, rp
  • span
  • br
  • wbr

Thursday, 14 November 2013

30 things you no longer need because of SMART PHONES



  1. Phones
  2. Flashlights
  3. Rolodex
  4. Newspapers
  5. Magazines
  6. Compasses
  7. Cameras
  8. Notepad
  9. Voice Recorder
  10. Calculator
  11. Watches
  12. Calculator Watches
  13. Alarm Clocks
  14. Egg Timers
  15. Stopwatches
  16. Mail
  17. Portable Game System
  18. Maps
  19. GPS System
  20. Encyclopedias ( Wiki )
  21. Radios
  22. Walkmen
  23. Record Stores
  24. Yellow Pages
  25. Takeout Menus
  26. Weathermen
  27. Photo Album
  28. Remembering Anything
  29. Boredom
  30. Conversation

A tutorial on how to create an interesting animated 3D opening type effect with pseudo-elements

Thursday, 7 November 2013

Multiple Backgrounds Using Css

Tinted Images with Multiple Backgrounds and Multiple background images

The background property in css can accept comma separated value. "Multiple" backgrounds.
.tinted-image{
  background: linear-gradient ( rgba( 255, 0, 0, 0.45), rgba( 255, 0, 0, 0.45), )
}



Which CSS Measurements To Use When

It can be difficult for web developers to understand which units to use where, and when, on their pages.
Pixels ( px ), Percentage ( % ), em, ex, Points and Picas

Pixels 
Use for: hairline borders and general elements when creating fixed-width designs.

Percentage 
Use for: making responsive images and containers; setting height on the body in some cases.

em, ex
Use for: typography, and elements related to typography.

Points and Picas
Use for: print stylesheets.



I love Typography

Expletus Sans is a fifteen-year old google free font

It was March 2nd, 2011. For more details  Click me:-