CSS stands for Cascading Style Sheet, which is use to style the HTML tags or web page. Also through it, we can include animations on our web page.
There are 3 methods by which we can implement CSS on our web page and these are as follows:-
When we want to give the same styling to multiple elements and CSS gives us the freedom of selecting all the elements and give same styling in some lines of code rather then specifying CSS for all the elements, then it is known as the Group Selectors in CSS
For example:- h1, h2, p{ color : red; }.
As we know frameworks or preplanned libraries makes very easy and more standard compliant web page styling. And some of these frameworks are as follows:-
When we use to give different type of same styling to the same element then generally it then override the property.
For example:- If I give p{color: red;} property once but then again I give the property p{color: green;} then the color red property will override by the green color property. And this is known the conflicts in the CSS.
To round the corners of buttons, or to give the button the shape of circle or round then we need to add the style:- border-radius : 50%.
For having the overline over any element, then we need to add the style:- text-decoration: overline.
We can able to select any element through 3 ways:-
Through important declaration property we use to specify high priority to that particular CSS and it use to override all other property.
For example:- p{color: red !important} if we declare paragraph like this then other properties of color in paragraph will override.
By universal selector, we can able to define the same CSS to every elements present in the document. We use to define it through (*).
For example:- *{font-style: 22px;}
We can achieve the round corners of the border by using the CSS property, border-radius.
Yes, we can able to round the left corner side of the border by using the CSS property, border-left-radius.
We can able to attach one or more shadows to the element through box-shadow property of CSS.
Yes, sure we can able to delay the CSS property effect of any element by using another CSS property- transition-delay.
When we want to change the styling or behavior of any element, when the mouse cursor pointer is over to that particular element, then we need to use this hover property of CSS.
From the column property of CSS, we can define the columns in particular section or document.
Through attributes of the element, we can able to style the elements like as follows:-
For example:- In HTML- <input type="text" name="fname"/> and in CSS, we can style the element by- input[type="text"]{ color: red;}
It is used to set the length of the flexible items. It makes so easy to position the child elements and main container. And also this property is much responsive and mobile-friendly.
Through clip-path property of CSS, we can able to extract out the different types of shapes from any image or background element.
Opacity just provide the transparency to any element. In simple words, it just sets the opacity level for an element.
We can able to bind the animation to any CSS through animation-name property, where we use to define the name for the animation and then separately, we define the animation.
Pseudo element is the keyword that added to a selector that lets you style a specific part of the selected elements.
For example:- ::first-line, that can be use to change the styling of first line.
Yes, we can able to change the styling of scrollbar by using the new pseudo element ::scrollbar.
Display: none property is use to delete the element and even the space consumed by that particular element also been deleted.
But Visibility: hidden property is use to hide the element but the space consumed by that particular remains the same.
There are total 4 values of Position and these are as follows:-
Any text, character or element exceeding from the element, where we have designated this overflow: hidden property, then automatically the exceeding part (element or text) use to disappear.
If we want to have the visual effects like blur, brightness to any element, then this Filter property of CSS we can use here, to play with the brightness, contrast, blur, greyscale and opacity etc. of any element.
To pause any running state of animation, then simple we need to add the style- animation-play-state: paused.
If we want, no one can able to copy and paste our content, then for this we need to add the style- user-select: none.
Every HTML element is wrapped under a rectangular box. This box model is used to determine the height and width of the rectangular box. As the CSS box consists of width, height, padding, margin and border.
SASS | SCSS |
---|---|
It is based on indication. | It is not based on indication. |
It uses curly brackets or semicolons. | It does not use curly brackets or semicolons. |
The file here use to save with .sass extension. | The file here use to save with .scss extension. |
It's just been a unit to measure the height percentage with respect to the viewport. The measure VH is equal to 1/100 of the height of the viewport. That means if the height of the browser is 1000px then 1vh is equal to 10px.
Again it's been a unit to measure the width percentage with respect to the viewport. The measure WH is equal to 1/100 of the width of the viewport. That means if the width of the browser is 1000px then 1vw is equal to 10px.
Pseudo elements allows us to create the items which usually not exist in the document tree. For example:- (::before, ::after, ::first-line & ::selection).
Pseudo classes allows us to select the regular elements but with certain conditions like when the user is hovering over the link or etc. For example:- (:link, :visited, :focus & :active).
To change the font face, we can use the font-family property. For example:- p{ font-family: "Open Sans"};
Opacity refers to the degree to which the content is transparent or opaque. The values from ranging from 0 to 10, where 1 means the element is completely opaque.
(div ~ p) Here all the (p) elements that have (div) elements preceeding anywhere, we can able to customize the (p) elements.
(div + p) Here all the (p) elements that have placed immediately after the (div) elements, we can able to customize those (p) elements.
CSS Grid layout is a 2-Dimensional system, that means it can handle both columns and rows. Beautiful and attractive design we can able to create too through grid layout.
CSS3 Calc() function allows us to perform the mathematical operations on
property values. We can specify the width which can be the result of the addition of two or
more numeric values.
For exmaple:- .demo{Width: calc(100px + 60px)};
This contextual selector is used to select the special occurences of an element.
Tweening is a process that creates intermediate frames between two images to get the appearance of the first image, which develops into the second image.
There are mainly 4 types of elements which are as follows:-
An image can be moved along with the text to the right or to the left using this float property. But this property does not change the properties of the element.
CSS | CSS3 |
---|---|
Responsive design is not supported here. | Responsive design is supported here. |
It can't split into modules. | It can split into modules. |
3D animations and transformations are not supported. | 3D animations and transformations are supported here. |
It is little biot slower. | It is faster than CSS. |
It does not support media query. | It support media query. |