Articles on Trending Technologies

Technical articles with clear explanations and examples

Selects all <p> elements inside <div> elements with CSS

George John
George John
Updated on 24-Jun-2020 4K+ Views

Use the element element selector to select all elements inside another element.You can try to run the following code to implement element element selector,ExampleLive Demo                    div p {             color: white;             background-color: blue;          }                     Demo Website       Fruits       Fruits are good for health.                This is demo text.          

Read More

Selects all <div> elements and all <p> elements with CSS

Ankith Reddy
Ankith Reddy
Updated on 24-Jun-2020 325 Views

To style, more than one element, use a comma. Separate each element with the comma to achieve this. You can try to run the following code to select and elements,ExampleLive Demo                    div, p {             color: blue;             background-color: orange;          }                     Demo Website       Fruits       Fruits are good for health.                This is demo text.          

Read More

Arrow to the left of the tooltip with CSS

George John
George John
Updated on 24-Jun-2020 862 Views

Use the right CSS property to add arrow to the right of the tooltip.You can try to run the following code to add a tooltip with arrow to the leftExampleLive Demo           .mytooltip .mytext {          visibility: hidden;          width: 140px;          background-color: blue;          color: #fff;          z-index: 1;          top: -5px;          left: 110%;          text-align: center;          border-radius: 6px;          padding: 5px 0;          position: absolute;       }       .mytooltip {          position: relative;          display: inline-block;          margin-left: 50px;       }       .mytooltip .mytext:after {          content: "";          position: absolute;          top: 50%;          right: 100%;          margin-top: -5px;          border-width: 6px;          border-style: solid;          border-color: transparent blue transparent transparent;       }       .mytooltip:hover .mytext {          visibility: visible;       }               Keep mouse cursor over me           My Tooltip text          

Read More

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

Daniol Thomas
Daniol Thomas
Updated on 24-Jun-2020 273 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                    [alt ~= Tutorials] {             border: 5px solid orange;             border-radius: 5px;          }                              

Read More

CSS animation-direction property

Krantik Chavan
Krantik Chavan
Updated on 24-Jun-2020 197 Views

Use the animation-direction property to set whether an animation should be played forwards, backward or in alternate cycles.You can try to run the following code to implement the animation-direction property:ExampleLive Demo                    div {             width: 150px;             height: 200px;             background-color: yellow;             animation-name: myanim;             animation-duration: 2s;             animation-direction: reverse;          }          @keyframes myanim {             from {                background-color: green;             }             to {                background-color: blue;             }          }                        

Read More

Set top tooltip with CSS

Nishtha Thakur
Nishtha Thakur
Updated on 24-Jun-2020 211 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;          color: #fff;          z-index: 1;          bottom: 100%;          left: 60%;          margin-left: -90px;          text-align: center;          border-radius: 6px;          padding: 5px 0;          position: absolute;       }       .mytooltip {          position: relative;          display: inline-block;          margin-top: 50px;       }       .mytooltip:hover .mytext {          visibility: visible;       }               Keep mouse cursor over me           My Tooltip text          

Read More

Usage of CSS transition-timing-function property

Ankith Reddy
Ankith Reddy
Updated on 24-Jun-2020 65 Views

Use the transition-timing-function property to set the speed curve of the transition effect. The values you can set are ease, ease-in, ease-out, linear, etc.You can try to run the following code to set the speed curve of the transition effect with CSSExampleLive Demo                    div {             width: 100px;             height: 100px;             background: red;             transition: width 4s;          }          #effect1 {             transition-timing-function: linear;          }          #effect2 {             transition-timing-function: ease-in;          }          div:hover {             width: 250px;          }                     Transition Effect       Hover over the div elements and see the transition effect and the speed:       linear effect       ease-in effect    

Read More

Set right tooltip with CSS

George John
George John
Updated on 24-Jun-2020 126 Views

To set right tooltip, use the left CSS property.You can try to run the following code to set right tooltip to a textExampleLive Demo           .mytooltip .mytext {          visibility: hidden;          width: 140px;          background-color: blue;          color: #fff;          z-index: 1;          top: -6px;          left: 100%;          text-align: center;          border-radius: 6px;          padding: 5px 0;          position: absolute;       }       .mytooltip {          position: relative;          display: inline-block;       }       .mytooltip:hover .mytext {          visibility: visible;       }               Keep mouse cursor over me           My Tooltip text          

Read More

How to position tooltips correctly with CSS

Nitya Raut
Nitya Raut
Updated on 24-Jun-2020 6K+ Views

To position tooltips correctly, use the right, left, top and bottom properties.Let us see how to position tooltips on the right:ExampleLive Demo           .mytooltip .mytext {          visibility: hidden;          width: 140px;          background-color: blue;          color: #fff;          z-index: 1;          top: -6px;          left: 100%;          text-align: center;          border-radius: 6px;          padding: 5px 0;          position: absolute;       }       .mytooltip {          position: relative;          display: inline-block;       }       .mytooltip:hover .mytext {           visibility: visible;       }               Keep mouse cursor over me           My Tooltip text          

Read More

Specify the speed curve of the animation with CSS

George John
George John
Updated on 24-Jun-2020 381 Views

Use the animation-timing-function to set the speed curve of the Animation. You can try to run the following code to achieve thisExampleLive Demo                    div {             width: 150px;             height: 200px;             position: relative;             background-color: yellow;             animation-name: myanim;             animation-duration: 2s;             animation-direction: alternate-reverse;             animation-iteration-count: 3;          }          @keyframes myanim {             from {left: 100px;}             to {left: 200px;}          }          #demo1 {animation-timing-function: ease;}          #demo2 {animation-timing-function: ease-in;}                     ease effect       ease-in effect    

Read More
Showing 43361–43370 of 61,248 articles
Advertisements