css presentation-1
css presentation-1
Sheets
By Shreyansh Yeole
Points Of Discussion
#Box-1{
text-align: center;
background-color: rgb(50, 0,
212);
color: aliceblue;
}
Output Slide
3.Class Selector
The class selector selects HTML elements with a specific
class attribute.
.Box{
border: 2px solid transparent;
padding: 10% 0;
background-color: #dedaf4;
box-shadow: 16px 16px rgb(179, 123, 212);
}
Output Slide
4.Universal Selector
The universal selector (*) selects all HTML elements on the
page.
*{
color: white;
background-color: black;
}
The CSS rule above will affect every HTML element on the page:
Output Slide
5. Grouping Selector
The grouping selector selects all the HTML elements with the same style
definitions.
Look at the following CSS code in the left side where h1,h2 and p elements required same
set of CSS definition thus, we can see the need of grouping selector(in the Right side):
-External CSS
-Internal CSS
-Inline CSS
External CSS
With an external style sheet, you can change the look of
an entire website by changing just one file!
HTML File
This includes:
CSS Background Color
CSS Text Color
CSS Border Color
(1.) CSS Background Color
You can set the background color for HTML
elements Using ‘Background-color’ property.
This involves:
background-color (Seen Earlier)
background-image
background-repeat
Background-position
background (shorthand property)
(2.)Background-image
The background-image property specifies an image to use as the
background of an element.
In CSS, the term "box model" is used when talking about design and
layout.
The CSS box model is essentially a box that wraps around every HTML
element. It consists of: content, padding, borders and margins. The image
Above illustrates the box model.