Hi Programmer! In this article, we provide the best collection of Essential CSS RecipesCSS3 effects like in Borders, Radio Buttons, Dimensions, Text and so on.
Nowadays you may use gradients even in borders. It is rather easy to use, just want to set pseudo-elements with lower
All illustration you can find here. Also, there is an approach with and
background-origin. Finally, in the bright future
border-image estate will be supported by all browsers and solution for this will look as follow:
Do you remember this moment when you needed to set for
background-size the image because it will solve a lot of problems? Now you may use which
object-fit is supported by WebKit and will be combined with Firefox soon.
Counters in CSS
Not everyone knows that counteracts can be made with CSS:
and radio button:
Not so far Firefox and Safari began to support blend modes legal as Photoshop does. It also works in Chrome and Opera but with flags. See an example:
You may don't see but z-index supports transitions too! It doesn't develop it's value on each step so you take that it doesn't have a development. But it does!
We can use it to disclose the current color so we don't have to construct it lots of times. It can be good when working with SVG icons which change their color depending on their parents. Usually, we do it as follows:
but let's do it with:
Another code with pseudo elements:
Advanced CSS Counters
You can also count the identical checkboxes which were selected by the user:
You can also build a small calculator:
Not so far this world exposed some new ways to portray sizes of different objects. Here are them:
vw(viewport width) - one percent of the browser window's width.
vh(viewport height) - the like but for height.
vmaxminimally and maximal value between
The attractive thing is that they all are hugely supported by most of the modern browsers so you can freely use them. Why do we want them? That's because they make all large simpler. You don't have to specify a percentage of parent's element size and any other stuff. Just have a look:
Or you can put a beautiful popup at the center of the screen:
Also, there are some negative facts about using this feature:
- IE9 should be told to use
- iOS7 may have some bugs with.
vmaxis not fully supported yet.