Found 598 Articles for Front End Scripts

Current Version of CSS

karthikeya Boyini
Updated on 30-Jul-2019 22:30:22

1K+ Views

CSS3 is the latest standard of CSS earlier versions (CSS2). Cascading Style Sheets, level 1 (CSS1) was came out of W3C as a recommendation in December 1996. This version describes the CSS language as well as a simple visual formatting model for all the HTML tags.CSS2 became a W3C recommendation in May 1998 and builds on CSS1. This version adds support for media-specific style sheets e.g. printers and aural devices, downloadable fonts, element positioning, and tables.CSS3 became a W3C recommendation in June 1999 and builds on older versions CSS. It has divided into documentation is called as Modules and here ... Read More

What is CSS and why it is used?

varun
Updated on 30-Jul-2019 22:30:22

335 Views

CSS handles the look and feel part of a web page. Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used, layout designs, variations in the display for different devices and screen sizes as well as a variety of other effects.Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable.CSS is easy to learn and understand but it provides powerful control over the presentation of ... Read More

HTM5 checkValidity() method

Sravani S
Updated on 30-Jan-2020 07:08:40

335 Views

The HTML5 checkValidity() works in Google Chrome and Opera as well. This works as well:                    .valid { color: #0B7866; }          .invalid { color: #0B6877; }                            function check(input) {             var out = document.getElementById('result');                         if (input.validity) {                if (input.validity.valid === true) {                   out.innerHTML = "" + input.id + " valid";                } else {                   out.innerHTML = "" + input.id + " not valid";                }             }            console.log(input.checkValidity());          };                      Minimum:                                

HTML5 Canvas Transformation

Krantik Chavan
Updated on 30-Jan-2020 07:07:31

377 Views

HTML5 canvas provides methods that allow modifications directly to the transformation matrix. The transformation matrix must initially be the identity transform. It may then be adjusted using the transformation methods.ExampleLet us see an example of canvas transformation:                    function drawShape(){             // get the canvas element using the DOM             var canvas = document.getElementById('mycanvas');             // Make sure we don't execute when canvas isn't supported             if (canvas.getContext){                // use getContext to use the canvas for drawing                var ctx = canvas.getContext('2d');                var sin = Math.sin(Math.PI/6);                var cos = Math.cos(Math.PI/6);                ctx.translate(200, 200);                var c = 0;                                for (var i=0; i

How to save DIV as Image with canvas2image with extension in HTML?

Govinda Sai
Updated on 30-Jan-2020 07:05:15

681 Views

DIV content can be saved as image with the help of html2canvas function in javascript. DIV tag defines a section in HTML document. Example:    Hello world This shows division area named as cpimg. Html2canvas function saves div as an image with following code:html2canvas(document.querySelector(“#cpimg”)).then(canvas {    document.body.appendChild(canvas) });It saves the referred div section “cpimg” into the image.

How to use FastClick with jQuery Mobile the right way in HTML?

Lakshmi Srinivas
Updated on 30-Jan-2020 07:01:08

170 Views

There is no need to use 3rd party plugins like Fastclick. jQuery Mobile solved this with vclick event.JQuery works well on mobile and desktop and don’t have 300 ms delay$(document).on('vclick', '#impButton', function(){ });

Draw a circle filled with random color squares on HTML5 canvas

Sravani S
Updated on 30-Jan-2020 06:59:59

1K+ Views

When we need to fill a circle with 1x1 pixels, all with different colors in a browser, we can use a simple approach like this: Drawing all pixels with some random colors in a 200x200 grid on a canvas Changing composite mode Drawing circle on topLet us seen an example:var canvas1 = document.getElementById('canvas'), // getting canvas element    ctx1 = canvas1.getContext('2d'), // getting context    x, y = 0, // initializing x and y coordinates    diamet = canvas1.width,    radius = diamet * 0.6;    ctx1.translate(0.6, 0.6); //Making pixels sharper        for(; y < diamet; y++) { // x/y grid ... Read More

HTML5 & JavaScript: resolution or size of

karthikeya Boyini
Updated on 30-Jul-2019 22:30:22

720 Views

When the device is taking very large photos and we want to make such setting to take smaller photos from the mobile phone, then we can use two W3C ways of taking pictures.This can be done either through HTML or through JavaScript.HTML Media CaptureFor this, HTML uses capture and accept=”image/* ” on input tag .This will specify intend.However, through this way, we cannot specify the sizeMedia capture streamsIt allows fully programmatic access to the camera so that user can implement own capture dialogue for videos and still images.It also specifies constraints related to width, height, frame rate, facing rate, facing ... Read More

Remove a FileList item from a multiple “input:file” in HTML5

V Jyothi
Updated on 30-Jan-2020 06:58:16

2K+ Views

When there is a situation where we need to remove items from DOM’s through JavaScript, we cannot do so directly from FileList object. We need to assign the following to an array:$('input:file#upload')[1].filesAfter that remove items from this array using splice or method of our choice and use that array.Another way is to upload files with the help of HTML file uploader and then delete corresponding objects by using JavaScript.

Uniquely identify files before uploading with the HTML5 file API

Nitya Raut
Updated on 30-Jul-2019 22:30:22

205 Views

While making a fileuploader using HTML5 file API, we want to be sure that no duplicate files are uploaded based on actual data. Calculating a hash with MD5 is not an efficient method as all that happen on the client side and is time-consuming. There is actually no shortcut for this. If we need to identify duplicate files with no confusion then we have to first read the content of each file and then compare it.Another way is to find MD5 hash for given subset of file blocks using predefined invariant window.

Advertisements