Daniol Thomas has Published 197 Articles

Set how many seconds or milliseconds a CSS transition effect takes to complete

Daniol Thomas

Daniol Thomas

Updated on 02-Jul-2020 08:25:03

274 Views

Use the transition-duration property in CSS to set how many seconds or milliseconds a CSS transition effect takes to complete −ExampleLive Demo                    div {             width: 150px;             height: 150px;             background: blue;             transition-property: height;             transition-duration: 2s;          }          div:hover {             height: 200px;          }                     Heading One       Hover over the below box to change its height.          

Perform Animation on CSS padding-top property

Daniol Thomas

Daniol Thomas

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

277 Views

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

CSS voice-range Speech Media property

Daniol Thomas

Daniol Thomas

Updated on 25-Jun-2020 14:48:43

124 Views

The voice-range property in CSS is used to set the range of the speaking voice. This is the pitch range.The following is the syntax:voice-range: [[x-low | low | medium | high | x-high]]Above, set the range of pitch i.e. low, medium, high, etc.The following is an example of the voice-range ... Read More

HTML5 data-* attribute type casting strings and numbers

Daniol Thomas

Daniol Thomas

Updated on 25-Jun-2020 05:31:11

151 Views

For data-attribute typecasting of Numbers and String, use −[...document.querySelectorAll("a")].forEach(a =>    console.log("type: %s, value: %o", typeof a.dataset.value, a.dataset.value) );The above is for the following data-attributes −6.0 6.5

HTML5 Canvas to PNG File

Daniol Thomas

Daniol Thomas

Updated on 24-Jun-2020 14:20:32

835 Views

To convert HTML5 canvas to PNG, follow the below-given steps −You need to add the generated data URL to the href attribute of an tag.Dialog for base64 image −Add a filename −Now define http headers −headers=Content-Disposition: attachment; filename=newimg.pngTo deal with the RAM of the web browser and make its utilization ... Read More

Shorthand property to set columns with CSS

Daniol Thomas

Daniol Thomas

Updated on 24-Jun-2020 14:05:09

154 Views

Use the columns property to set columns with CSS. You can try to run the following code to implement the columns property:ExampleLive Demo                    .demo {             column-rule-color: gray;             columns: 100px ... Read More

Center pagination on a web page with CSS

Daniol Thomas

Daniol Thomas

Updated on 24-Jun-2020 11:39:33

799 Views

You can try to run the following code to center pagination on a web page:ExampleLive Demo                    .demo {             display: inline-block;          }          .demo1 {     ... Read More

Align the grid inside the container using CSS

Daniol Thomas

Daniol Thomas

Updated on 24-Jun-2020 08:37:31

115 Views

You can try to run the following code to align the grid inside the container using the justify-content property:ExampleLive Demo                    .container {             display: grid;             background-color: gray;   ... Read More

How to change the text color of an element in HTML?

Daniol Thomas

Daniol Thomas

Updated on 24-Jun-2020 08:21:37

9K+ Views

Use the color attribute in HTML to display the color of the text.Note − This attribute is not supported in HTML5.ExampleYou can try to run the following code to learn how to implement color attribute in HTML −           HTML Background Colors                                                    This is demo text.                                

How to select elements with an attribute value containing a specified word with CSS?

Daniol Thomas

Daniol Thomas

Updated on 24-Jun-2020 07:01:35

237 Views

Use the [attribute ~= "value"] selector to select elements with an attribute value containing a specified word with CSS.You can try to run the following code to implement the [attribute ~= "value"] selector. Here, the word we are searching is “Tutorials”, ExampleLive Demo           ... Read More

Advertisements