Make a box with rounded corners: |
|
---|---|
|
You can see that the box has a rounded corner, which we can do by using the CSS code below. In this case, "box" is the class name for the div.
.box { |
Create a box with a shadow effect using only CSS: |
|
---|---|
|
You can see that the box has a shadow effect, which we can do by using the CSS code below.
In this case, "boxShadow" is the class name for the div.
.boxShadow { |
Box shadows take five values and are applied to the outside portion of tags by default. first value for the X index, second value for the Y index, third value for the blur option, fourth value for the spread, and last value for the shadow's color | |
Create a box with a Linear Gradient using only CSS: |
|
|
You can see that the box has a linear background color,
which we can do by using the CSS code below.
In this case, "boxLinearGradient" is the class name for the div.
.boxLinearGradient { |
Multiple colors are added to the background using a linear gradient. By default, the order is top to bottom. We are also able to adjust the order to "left," "right," and "60 degrees." |
Using text shadow in CSS, create a text shadow: |
|
---|---|
Text shadow effect
|
You can see that the text shadow effect , which we can do by using the CSS code below. In this case, "Shadoweffect"is the class name for the div.
.Shadoweffect |
Using loader in CSS, create a loader: |
|
---|---|
|
You can see the loader , which we can do by using the CSS code below. In this case, "loader"is the class name for the div.
.loader { |
Using filter: drop-shadow in CSS, create a image shadow: |
|
---|---|
![]() |
You can see that the image shadow , which we can do by using the CSS code below. In this case, "image"is the class name.
.image{ |
Using this code to ensure that the image size will always fit within the div even if the div size changes. |
|
---|---|
![]() |
You can see the image that we were able to create with the CSS code below."Photo" is the class name in this instance.
.photo{ |