div { border-top-left-radius: 25px; /* length,%,initial,inherit,default:0 */ border-top-right-radius: 25px; /* length,%,initial,inherit,default:0 */ border-bottom-left-radius: 25px; /* length,%,initial,inherit,default:0 */ border-bottom-right-radius: 25px; /* length,%,initial,inherit,default:0 */ background: #73AD21; padding: 20px; width: 200px; height: 150px; }
div { border-radius: 25px 10px 30px 25px; background: #73AD21; padding: 20px; width: 200px; height: 150px; }
div { border-image-source: url(border.png); /* none,image,initial,inherit,default: none */ border-image-slice: 30%; /* number,%,fill, initial,inheri,default: 100% */ border-image-width: 10px; /* length,number,%,auto,initial,inherit default: 1 */ border-image-outset: 10px; /* length,number,initial,inherit default: 0 */ border-image-repeat: repeat; /* stretch,round,space,initial,inherit, default: stretch */ }
div { border-image: url(border.png) 30 round; }
You will also learn about the following properties:
The CSS background-size property allows you to specify the size of background images.
#div1 { background: url(img_flower.jpg); background-size: 100px 80px; background-repeat: no-repeat; }
The background-origin property specifies the origin position (the background positioning area) of a background image.
#example1 { border: 10px double black; padding: 25px; background: url(paper.gif); background-repeat: no-repeat; background-origin: content-box; }
The background-clip property defines how far the background (color or image) should extend within an element.
div { border: 10px dotted black; padding: 15px; background: lightblue; background-clip: padding-box; }
#example1 { background: url(img_tree.gif) left top no-repeat, url(img_flwr.gif) right bottom no-repeat, url(paper.gif) left top repeat; background-size: 50px, 130px, auto; }
p { color:rgba(255, 0, 0, 0.2); }
CSS gradients let you display smooth transitions between two or more specified colors.
CSS defines two types of gradients:
p { color:rgba(255, 0, 0, 0.2); }
Linear Gradient - Top to Bottom
#grad { background: linear-gradient(red, yellow); }
Linear Gradient - Left to Right
#grad { background: linear-gradient(to right, red , yellow); }
Linear Gradient - Diagonal
#grad { background: linear-gradient(to bottom right, red, yellow); }
Linear Gradient - Using angle
#grad { background: linear-gradient(-90deg, red, yellow); }
Linear Gradient - Multiple Color Stops
#grad { background: linear-gradient(red, yellow, green); }
Linear Gradient - Using Transparency
#grad { background: linear-gradient(to right, rgba(255,0,0,0), rgba(255,0,0,1)); }
Linear Gradient - Repeating a linear-gradient
#grad { background: repeating-linear-gradient(red, yellow 10%, green 20%); }
Radial Gradient - Evenly Spaced Color Stops (this is default)
#grad { background: radial-gradient(red, yellow, green); }
Radial Gradient - Differently Spaced Color Stops
#grad { background: radial-gradient(red 5%, yellow 15%, green 60%); }
Radial Gradient - Set Shape
#grad { background: radial-gradient(circle, red, yellow, green); }
Radial Gradient - Repeating a radial-gradient
#grad { background: repeating-radial-gradient(red, yellow 10%, green 15%); }
you will learn about the following properties:
you only specify the horizontal shadow (2px) and the vertical shadow (2px):
h1 { text-shadow: 2px 2px red; /* default:none */ }
Then, add a blur effect to the shadow:
h1 { text-shadow: 2px 2px 5px red; }
The following example shows a red and blue neon glow shadow
h1 { text-shadow: 0 0 3px #FF0000, 0 0 5px #0000FF; }
you only specify the horizontal shadow and the vertical shadow
div { box-shadow: 10px 10px grey; /* default:none */ }
add a blur effect to the shadow:
div { box-shadow: 10px 10px 5px grey; }
you will learn about the following properties
The CSS text-overflow property specifies how overflowed content that is not displayed should be signaled to the user.
p.test1 { white-space: nowrap; width: 200px; border: 1px solid #000000; overflow: hidden; text-overflow: clip; /* ellipsis, default:clip */ }
The CSS word-wrap property allows long words to be able to be broken and wrap onto the next line
p { word-wrap: break-word; /* break-all,keep-all ,default: normal */ }
The CSS word-break property specifies line breaking rules
p.test1 { word-break: keep-all; /* break-all,keep-all ,default: normal */ } p.test2 { word-break: break-all; }
Web fonts allow Web designers to use fonts that are not installed on the user's computer.
Different Font Formats
The CSS text-overflow property specifies how overflowed content that is not displayed should be signaled to the user.
@font-face { font-family: myFirstFont; src: url(sansation_light.woff); } p { font-family: myFirstFont; }
Include padding and border in the element's total width and height:
The box-sizing property defines how the width and height of an element are calculated: should they include padding and borders, or not.
div { box-sizing: border-box; width:300px; height:200px; border: 5px solid red; float: left; }
Using media queries are a popular technique for delivering a tailored style sheet to desktops, laptops, tablets, and mobile phones (such as iPhone and Android phones).
@media screen and (min-width: 480px) { body { background-color: lightgreen; } }
Total : 20775
Today :53
Today Visit Country :