Answer the question
In order to leave comments, you need to log in
How to make a website cross-browser?
I'm new to layout, but I realized that browsers now support a lot (well, yes, except for IE)).
There are probably pros in layout here. Are prefixes needed now?
.someBlock{
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
}
Answer the question
In order to leave comments, you need to log in
I speak from my amateur point of view: depending on the number of browsers and their versions that your website / application must support, it is determined whether prefixes are needed. For example, the same flex: once, when the version of, for example, Chrome was 21.0, then the -webkit prefix was used, but in new versions it "vanished". If you want your site to support Chrome version 21.0, you must also specify -webkit-flex.
use autoprefixer, don't write prefixes by hand. In the same place in the options and indicate how ancient browsers should be supported.
There is also such a method, similar to bootstrap - the class is responsible for the required css property
i.e. you write this ONCE, for example, three properties:
.df{
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
}
.fdc{
flex-direction: column;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
}
.aic{
align-items: center
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question