Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
CSS Articles
Page 20 of 130
CSS position: fixed;
The position: fixed; property allows you to position element relative to the viewport. You can try to run the following code to implement CSS position: fixed;Example div{ position: fixed; bottom: 0; right: 0; width: 200px; border: 3px solid blue; } position: fixed; The position: fixed; property allows you to position element relative to the viewport. div has position: fixed; Output
Read MoreRole of CSS: disabled Selector
Use the CSS :disabled selector to style every disabled element. You can try to run the following code to implement the :disabled selectorExample input:enabled { background: blue; } input:disabled { background: red; } Subject Student: Age:
Read MoreRole of CSS :empty Selector
Use the CSS :empty selector to style every element that has no children with CSS. You can try to run the following code to implement the :empty selector −Example p.demo { width: 300px; height: 20px; background: gray; } p:empty { width: 150px; height: 20px; background: orange; } This is demo text. Below is empty text.
Read MoreRole of CSS :enabled Selector
Use the CSS :enabled selector to style every enabled element. You can try to run the following code to implement the :enabled selector −Example input:enabled { background: blue; } Subject Student: Age:
Read MoreRole of CSS: first-child Selector
Use the CSS :first-child selector to style every elements that is the first child of its parent.ExampleYou can try to run the following code to implement the :first-child selector p:first-child { background-color: orange; } Heading This is demo text. This is demo text, with the first child of its parent div. This is demo text, but not the first child.
Read MoreStyle all <input> elements with an invalid value with CSS
To style all elements with an invalid value, use the CSS :invalid selector.ExampleYou can try to run the following code to implement the :invalid selector − input:invalid { background: red; } Heading The style (red color background) appears if you type an irrelevant/ invalid email address.
Read MoreRole of CSS :link Selector
Use the CSS :link selector to style all unvisited links. You can try to run the following code to implement the :link selector −Example a:link { background-color: orange; } Demo Websitehttps://www.example.com/
Read MoreRole of CSS :not (selector) Selector
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 selectorExample p { color: red; } :not(p) { color: blue; } Heading 1 Heading 2 Heading 3 This is a paragraph. This is another paragraph.
Read MoreRole of CSS :nth-child(n) Selector
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) selectorExample 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.
Read MoreX-axis 3D transform with CSS3
You can try to run the following code to implement X-axis 3D transform with CSS3Example 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.
Read More