Nishtha Thakur has Published 568 Articles

Animate CSS padding-right property

Nishtha Thakur

Nishtha Thakur

Updated on 25-Jun-2020 14:56:49

98 Views

To implement animation on padding-right property with CSS, you can try to run the following code:ExampleLive Demo                    div {             width: 350px;             height: 150px;             outline: 3px solid orange;             animation: myanim 3s infinite;          }          @keyframes myanim {             30% {                padding-right: 60px;             }          }                     CSS padding-right property          

Animate CSS padding-bottom property

Nishtha Thakur

Nishtha Thakur

Updated on 25-Jun-2020 14:53:59

952 Views

To implement animation on padding-bottom property with CSS, you can try to run the following code:ExampleLive Demo                 div {          width: 350px;          height: 150px;          outline: 3px solid blue;          animation: myanim 3s infinite;       }       @keyframes myanim {          50% {             padding-bottom: 30px;          }       }                     CSS padding-bottom property          

Cross-browser drag-and-drop HTML file upload?

Nishtha Thakur

Nishtha Thakur

Updated on 25-Jun-2020 07:50:35

193 Views

For cross-browser HTML File Uploader, use FileDrop. It works on almost all modern web browsers.As per the official specification −FileDrop is a self-contained cross-browser for HTML5, legacy, AJAX, drag & drop, JavaScript file upload

HTML5 Audio to Play Randomly

Nishtha Thakur

Nishtha Thakur

Updated on 25-Jun-2020 07:38:46

274 Views

To play randomly, add the songs like this −init ([    'http://demo.com/songs/song1.mp3,    'http://demo.com/songs/song2.mp3,    'http://demo.com/songs/song3.mp3 ]);Use the following to play randomly using Math.random −function displayRandom() {    var audio = Math.floor(Math.random() * (collection.length));    audio = collection[audio];    audio.play();    setTimeout(loop, audio.duration*1000); }Read More

Translating HTML5 canvas

Nishtha Thakur

Nishtha Thakur

Updated on 25-Jun-2020 07:20:55

198 Views

Use the translate() method to translate canvas. HTML5 canvas provides a translate(x, y) method which is used to move the canvas and its origin to a different point in the grid.Here argument x is the amount the canvas is moved to the left or right, and y is the amount ... Read More

How to get a key/value data set from a HTML form?

Nishtha Thakur

Nishtha Thakur

Updated on 25-Jun-2020 06:19:04

672 Views

To get a key/ value data set from a HTML form, use jQuery.Let us say this is our HTML −     For JS −var data = $('form#form1’).serializeArray(); // [{'demo: 'value'}] $.ajax({    data: data });

How to position text to bottom right on an image with CSS

Nishtha Thakur

Nishtha Thakur

Updated on 24-Jun-2020 14:52:01

998 Views

To position text to bottom left, use the bottom and right property. You can try to run the following code to position text to bottom right on an image:ExampleLive Demo                    .box {             position: relative;   ... Read More

Specify the gap between the columns with CSS

Nishtha Thakur

Nishtha Thakur

Updated on 24-Jun-2020 11:50:27

107 Views

Use the column-gap property to set the gap between the columns. You can try to run the following code to implement the column-gap property, with value 50px:ExampleLive Demo                    .demo {             column-count: 4;   ... Read More

How to scale down an image with CSS to make it responsive

Nishtha Thakur

Nishtha Thakur

Updated on 24-Jun-2020 07:22:53

329 Views

To make an image responsive, you can try to run the following code:ExampleLive Demo                    img {             max-width: 100%;             height: auto;          }                        

Set top tooltip with CSS

Nishtha Thakur

Nishtha Thakur

Updated on 24-Jun-2020 06:59:27

187 Views

To set-top tooltip, use the bottom CSS property.You can try to run the following code to set-top tooltip to a text:ExampleLive Demo           .mytooltip .mytext {          visibility: hidden;          width: 140px;          background-color: blue;     ... Read More

Previous 1 ... 3 4 5 6 7 ... 57 Next
Advertisements