Found 1594 Articles for CSS

CSS3 font combinations

varun
Updated on 20-Jun-2020 08:50:06

128 Views

CSS3 has adapted font combinations technology. In here, if the browser does not support the first font then it tries the next font.Let us see an example of Sans-Serif fonts −

Set Media Queries for different CSS style rules for different size devices

Abhinanda Shri
Updated on 29-Jun-2020 08:30:19

291 Views

To set media queries for different CSS style rules, you can try to run the following code −ExampleLive Demo                    body {             background-color: lightpink;          }          @media screen and (max-width: 420px) {             body {                background-color: lightblue;             }          }                     If screen size is less than 420px, then it will show lightblue color, or else it will show light pink color    

CSS3 Responsive Web Design

usharani
Updated on 20-Jun-2020 08:41:11

300 Views

Responsive web design provides an optimal experience, easy reading and easy navigation with a minimum of resizing on different devices such as desktops, mobiles, and tabs).Let us see what is a responsive web design:

Media queries with CSS3

Ankitha Reddy
Updated on 30-Jul-2019 22:30:22

295 Views

Media queries are for different style rules for different size devices such as mobiles, desktops, etc. You can try to run the following code to implement media queries with CSS3 − Example Live Demo body { background-color: lightpink; } @media screen and (max-width: 420px) { body { background-color: lightblue; } } If screen size is less than 420px, then it will show lightblue color, or else it will show light pink color

CSS Box Sizing Property

Priya Pallavi
Updated on 29-Jun-2020 08:29:24

121 Views

Box-sizing property is used to change the height and width of the element. Since CSS2, the box property has worked like as shown below −width + padding + border = actual visible/rendered width of an element's box height + padding + border = actual visible/rendered height of an element's boxExampleTo understand the box-sizing property, let us see an example:Live Demo                    .div1 {             width: 300px;             height: 100px;             border: 1px solid blue;             box-sizing: border-box;          }          .div2 {             width: 300px;             height: 100px;             padding: 50px;             border: 1px solid red;             box-sizing: border-box;          }                     TutorialsPoint.com       TutorialsPoint.com    

CSS2 sizing property vs CSS3 box sizing property

varma
Updated on 20-Jun-2020 08:40:10

311 Views

Let us understand the difference between CSS2 sizing property and CSS3 box-sizing property.CSS2 sizing propertyLive Demo                    .div1 {             width: 200px;             height: 100px;             border: 1px solid green;           }          .div2 {             width: 200px;             height: 100px;             padding: 50px;             border: 1px solid pink;          }                     TutorialsPoint.com       TutorialsPoint.com     CSS3 box-sizing propertyLive Demo                    .div1 {             width: 300px;             height: 100px;             border: 1px solid blue;             box-sizing: border-box;          }          .div2 {             width: 300px;             height: 100px;             padding: 50px;             border: 1px solid red;             box-sizing: border-box;          }                     TutorialsPoint.com       TutorialsPoint.com    

CSS3 Resize Property

Sreemaha
Updated on 29-Jun-2020 08:26:27

112 Views

The CSS3 resize property is having three common values as shown below −horizontalverticalbothExampleUsing both the values in resize property in the CSS3 user interface:Live Demo                    div {             border: 2px solid;             padding: 20px;             width: 300px;             resize: both;             overflow: auto;          }                     My Website    

Set the border image as rounded, repeated and stretched with CSS

mkotla
Updated on 29-Jun-2020 08:04:38

269 Views

The border-image-repeat property is used to set the border image as rounded, repeated and stretched with CSS.ExampleYou can try to run the following code to implement the border-image-repeat property:Live Demo                    #borderimg1 {             border: 15px solid transparent;             padding: 15px;             border-image-source: url(https://tutorialspoint.com/css/images/border.png);             border-image-repeat: round;             border-image-slice: 40;             border-image-width: 20px;          }                     This is image border example.    

Set the image path with CSS

Ankitha Reddy
Updated on 30-Jul-2019 22:30:22

713 Views

The border-image-source property is used in CSS to set the image path. You can try to run the following code to set the image path − Example Live Demo #borderimg1 { border: 15px solid transparent; padding: 15px; border-image-source: url(https://tutorialspoint.com/css/images/border.png); border-image-repeat: round; } This is image border example.

CSS border-image property

seetha
Updated on 29-Jun-2020 08:03:34

99 Views

CSS border-image property is used to add image border to some elements. You can try to run the following code to implement the border-image property −ExampleLive Demo                    #borderimg1 {             border: 15px solid transparent;             padding: 15px;             border-image: url(https://tutorialspoint.com/css/images/border.png) 50 round;          }                     This is image border example.    

Advertisements