Found 1594 Articles for CSS

Style every element that is the nth element of its parent with CSS

George John
Updated on 30-Jun-2020 11:15:07

179 Views

Use the CSS :nth-of-type(n) selector to style every element that is the nth element of its parent. You can try to run the following code to implement the :nth-of-type(n) selectorExampleLive Demo                    p:nth-of-type(2) {             background: yellow;          }                     This is demo text 1.       This is demo text 2.       This is demo text 3.       This is demo text 4.    

Methods of 3D transforms with CSS3

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

68 Views

The following are the methods used to call 3D transforms:ValuesDescriptionmatrix3d(n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n)Used to transforms the element by using 16 values of the matrixtranslate3d(x, y, z)Used to transforms the element by using x-axis, y-axis, and z-axistranslateX(x)Used to transforms the element by using x-axistranslateY(y)Used to transforms the element by using y-axistranslateZ(z)Used to transforms the element by using y-axisscaleX(x)Used to scale transforms the element by using x-axisscaleY(y)Used to scale transforms the element by using y-axisscaleY(y)Used to transforms the element by using z-axisrotateX(angle)Used to rotate transforms the element by using x-axisrotateY(angle)Used ... Read More

Role of CSS :nth-of-type(n) Selector

Chandu yadav
Updated on 30-Jun-2020 11:15:58

200 Views

Use the CSS :nth-of-type(n) selector to style every element that is the nth element of its parent. You can try to run the following code to implement the :nth-of-type(n) selectorExampleLive Demo                    p:nth-of-type(2) {             background: yellow;          }                     This is demo text 1.       This is demo text 2.       This is demo text 3.       This is demo text 4.    

Select every element that is the second element of its parent, counting from the last child

seetha
Updated on 30-Jun-2020 11:22:56

1K+ Views

Use the CSS :nth-last-of-type(n) selector to select every element that is the second element of its parent, counting from the last child.ExampleYou can try to run the following code to implement the :nth-last-of-type(n) selector:Live Demo                    p:nth-last-of-type(2) {             background: blue;             color: white;          }                     This is demo text 1.       This is demo text 2.       This is demo text 3.       This is demo text 4.       This is demo text 5.    

Style every element that is the second child of its parent with CSS

Arjun Thakur
Updated on 30-Jun-2020 11:22:25

1K+ Views

To style every element that is the second child of its parent with CSS, use the CSS :nth-child(n) selector.ExampleYou can try to run the following code to implement the :nth-child(n) selectorLive Demo                    p:nth-child(4) {             background: orange;             color: white;          }                     This is demo text 1.       This is demo text 2.       This is demo text 3.       This is demo text 4.       This is demo text 5.       This is demo text 6.    

X-axis 3D transform with CSS3

Ankith Reddy
Updated on 30-Jun-2020 11:19:17

112 Views

You can try to run the following code to implement X-axis 3D transform with CSS3ExampleLive Demo                    div {             width: 200px;             height: 100px;             background-color: pink;             border: 1px solid black;          }            div#myDiv {             -webkit-transform: rotateX(150deg);             /* Safari */ transform: rotateX(150deg);             /* Standard syntax */          }                              tutorials point.com                      Rotate X-axis                             tutorials point.com.                

Role of CSS :nth-child(n) Selector

George John
Updated on 30-Jun-2020 11:18:06

239 Views

Use the CSS :nth-child(n) selector to style every element that is the second child of its parent with CSS. You can try to run the following code to implement the :nth-child(n) selectorExampleLive Demo                    p:nth-child(4) {             background: orange;             color: white;          }                     This is demo text 1.       This is demo text 2.       This is demo text 3.       This is demo text 4.       This is demo text 5.       This is demo text 6.    

Role of CSS :not (selector) Selector

Chandu yadav
Updated on 30-Jun-2020 11:17:36

370 Views

Use the CSS :not(selector) selector to style every element that is not the specified element. You can try to run the following code to implement the :not selectorExampleLive Demo                    p {             color: red;          }          :not(p) {             color: blue;          }                     Heading 1       Heading 2       Heading 3       This is a paragraph.       This is another paragraph.    

Style all unvisited links with CSS

radhakrishna
Updated on 30-Jun-2020 11:17:07

705 Views

To style all unvisited links, use the CSS :link selector. You can try to run the following code to implement the :link selector:ExampleLive Demo                    a:link {             background-color: orange;          }                     Demo Websitehttps://www.example.com/    

Role of CSS :link Selector

Giri Raju
Updated on 30-Jun-2020 11:16:36

225 Views

Use the CSS :link selector to style all unvisited links. You can try to run the following code to implement the :link selector −ExampleLive Demo                    a:link {             background-color: orange;          }                     Demo Websitehttps://www.example.com/    

Advertisements