Everything on a website is a box. Therefore it is quite important to understand the box model concept in web development but it is confusing. Let's see some hidden facts about it in this thread
𧡠ππ»
When laying out a document, the browser's rendering engine represents each element as a rectangular box. You can visualize it by adding some solid in any element.
You can manipulate this box using the basic standards of CSS like color, border, background etc.
{ 02 / 17 }
Every box comprised of four parts
- content dimensions
- padding
- border
- margin
Although outline is not considered as the part of box model but we can talk little bit about it later on this thread.
Creating CSS arts is a good way to master CSS. Here are some resources and tips that will take your CSS skills to the next level π
π§΅ππ»
Trust me, CSS art looks hard but they are not so tough they seem.
First things first, good color contrast is the number characterstic of a good website. Similarly color combinations makes your art good.
People with visual impairment preceive colors in different way. For example, here is how the dark red color is seen by people with monochromacy, dichromacy, and trichromacy
Hence picking up right color combinations is the most important part
You must have used the border-radius property in CSS, but here is complete guide covering some of the hidden concept of it
π§΅ππ»
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a border-radius in order to make round edges of sharp cornered box
Well we know that every element is a box in webpage. Consider that box clipped using 8 clips ππ»
We can adjust that clips in order to make distorted shapes
Do you have images on your webpage / website? You probably have.
Here are 5 cool things related to images on webpage, that I think you are not familiar with
π§΅ππ»
1οΈβ£ Set image scaling algorithm of user agent
The `image-rendering` CSS property sets an image scaling algorithm
When you specifies dimensions of image other than its natural size then the image will be up/downscaled by user agent using the algorithm specified by image-rendering
For example: "crisp-edges"
The image must be scaled with an algorithm that preserves contrast and edges in the image, and which does not smooth colors or introduce blur to the image in the process.