Found 8894 Articles for Front End Technology

How to set when the transition effect will start with JavaScript?

Shubham Vora
Updated on 25-Oct-2022 10:19:55

2K+ Views

In this tutorial, we shall learn to set when the transition effect starts with JavaScript. To set when the transition effect will start, use the JavaScript transitionDelay property. To make interactive components, we go for transition effects. Here let us get deeper into the topic and understand how we can set the transition start. Using the Style transitionDelay Property With Style transitionDelay property, we can set or return when the transition effect starts. We can specify the transitionDelay value in seconds(s) or milliseconds(ms). The delay can be either negative, positive, or zero. The transition effect starts immediately with a negative ... Read More

How to set whether an element should be visible in JavaScript?

Shubham Vora
Updated on 12-Oct-2022 11:18:51

2K+ Views

In this tutorial, we shall learn to set whether an element should be visible in JavaScript. Use the visibility property to hide or show an element. The visibility property takes different values such as visible, hidden, collapse, etc. To show an element, we set the visibility property to "visible" whereas to hide the element we set it to "hide". We can also set visibility using the display property. Let us briefly discuss the two properties in JavaScript to achieve our objective. Using the Style visibility Property JavaScript provides us with the visibility property with which we can ... Read More

How to handle tabs, line breaks and whitespace in a text in JavaScript?

Shubham Vora
Updated on 15-Sep-2022 12:08:54

1K+ Views

In this tutorial, we will learn how to handle tabs, line breaks, and whitespace in a text in JavaScript. To handle tabs, line breaks, and whitespace in text in JavaScript, we can use the whiteSpace property. This property has seven attributes − normal nowrap pre pre-line pre-wrap initial inherit Generally, in HTML we use the   entity for multiple spaces and the tag to get line break. But in JavaScript, we use different attribute properties (mainly the normal and pre) of white-space properties to handle the tabs, line breaks, and multiple whitespaces. The details of these two ... Read More

How to set whether the text should be overridden to support multiple languages in the same document with JavaScript?

Shubham Vora
Updated on 11-Nov-2022 13:17:02

232 Views

In this tutorial, we will learn how to set whether the text should be overridden to support multiple languages in the same document with JavaScript. Use the unicodeBidi property in JavaScript to set whether the text should be overridden to support multiple languages in the same document. Set it to normal, embed, or bidi-override. The bidi-override allows you to add the direction, i.e., rtl to ltr. Using the unicodeBidi Property In JavaScript, the unicodeBidi property is used along with the direction property to set whether the text should be overridden to support multiple languages in the same document. This property ... Read More

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

Nikitha N
Updated on 23-Jun-2020 11:40:15

113 Views

To set the duration for an effect to complete, use the transitionDuration property in JavaScript.ExampleYou can try to run the following code to return how many seconds or milliseconds a transition effect takes to complete −                    #div1 {             position: relative;             margin: 10px;             height: 300px;             width: 400px;             padding: 20px;             border: 2px solid blue;          }          #div2 {             padding: 80px;             position: absolute;             border: 2px solid BLUE;             background-color: yellow;             transform: rotateY(45deg);             transition: all 5s;          }          #div2:hover {             background-color: orange;             width: 50px;             height: 50px;             padding: 100px;             border-radius: 50px;          }                     Hover over DIV2       Set       DIV1          DIV2                      function display() {             document.getElementById("myDIV").style.transitionDuration = "5s";          }          

How to set the CSS property that the transition effect is for with JavaScript?

Nitya Raut
Updated on 23-Jun-2020 11:30:59

100 Views

Use the transitionProperty in JavaScript to set the CSS property. You can try to run the following code to return the CSS property that the transition effect is for with JavaScript −Example                    #div1 {             position: relative;             margin: 10px;             height: 300px;             width: 400px;             padding: 20px;             border: 2px solid blue;          }          #div2 {             padding: 80px;             position: absolute;             border: 2px solid BLUE;             background-color: yellow;             transform: rotateY(45deg);             transition: all 3s;          }          #div2:hover {             background-color: orange;             width: 50px;             height: 50px;             padding: 100px;             border-radius: 50px;          }                     Hover over DIV2       Set       DIV1          DIV2                      function display() {             document.getElementById("div2").style.transitionProperty = "width,height";          }          

How to set the four transition properties with JavaScript?

Shubham Vora
Updated on 11-Nov-2022 13:06:18

4K+ Views

In this tutorial, we will learn how to set the four transition properties with JavaScript. The transition is a CSS property used to set the transition effect of an element. It is a shorthand property for the following: transitionProperty, transitionDuration, transitionTimingFunction, and transitionDelay. The transitionProperty is used to specify the CSS property name that should have the transition effect. The transitionDuration property is used to specify the total time to complete the transition. The transitionTimingFunction is used to specify the speed curve of the transition. The transitionDelay is used to specify after how much time the transition will start. To ... Read More

How nested elements are rendered in 3D space with JavaScript?

Shubham Vora
Updated on 09-Nov-2022 10:49:13

126 Views

This tutorial will teach how the nested elements are rendered in 3D space with JavaScript. You may use the transform property to skew, scale, translate, or rotate an element. It alters the visual formatting model's coordinate space. The transform property can take the keyword value none or one or more transform function values. For several function values, rotate must be mentioned first. Because with the in-order (left to right) multiplication in the transform functions, composite transforms can be applied in the opposite direction, i.e., right to the left. The nested elements are rendered in 3D space using the HTML DOM ... Read More

How to set the right padding of an element with JavaScript?

Shubham Vora
Updated on 22-Nov-2022 07:19:15

875 Views

In this tutorial, we will learn how to set the right padding of an element with JavaScript. First, let's try to understand what padding means; padding is simply an extra space between a page's border and our content. The gap between them increases as the value of padding increases. Padding is similar to the margin; padding is distinct from the margin because padding adds space between the border and content, whereas margin is used to add space around the edge. While padding can be done on all sides, i.e., Top, Bottom, Left, and Right in the following lines, we will ... Read More

How to set the vertical alignment of the content in an element with JavaScript?

Shubham Vora
Updated on 09-Nov-2022 10:55:48

719 Views

In this tutorial, we will learn how to set the vertical alignment of the content in an element in JavaScript. The vertical-align property of HTML DOM Style is used to set the vertical alignment of the content in an element. The vertical-align attribute specifies or returns the vertical alignment of an element's content. The vertical-align attribute controls the vertical alignment of an inline-block or table-cell box. The vertical-align attribute is used to align the box of an inline element within its line box vertically. It may, for example, be used to arrange a picture within a line of text vertically. ... Read More

Advertisements