Je suis très novice en matière de développement Web et j'essaie de développer un site Web réactif. J'ai décidé sur 5 points de rupture, à savoir mobile (2-portrait-paysage) de 320px-768px, tablettes (2-portrait-paysage) de 769px-1024px, Desktop-Small de 1025px-1280px, Desktop-Medium de 1281px-1366px, Desktop-Large de 1367px-1680px et Desktop-ExtraLarge de 1681px-dessus.Développement d'un site Web réactif, indépendant de la résolution de l'appareil
Quand je teste ma première mise en page, développé sur un Mac-Retina-13" , le site avait l'air assez bien sur Safari & Chrome. Mais, complètement altérait sur un Acer Windows-15" , sur Firefox & Chrome .
Ensuite, avec quelques recherches, j'ai appris à connaître http://mydevice.io/ et Device-pixel-ratios.
Je voudrais savoir, afin d'avoir une expérience visuelle cohérente, à travers l'appareil indépendamment des résolutions d'écran & tailles d'écran, vais-je utiliser les requêtes de médias suivantes?
/* Phones - portait */
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: portrait) and (min-resolution: 96dpi) {
}
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: portrait) and (min-resolution: 144dpi){
}
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: portrait) and (min-resolution: 192dpi){
}
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: portrait) and (min-resolution: 288dpi){
}
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: portrait) and (min-resolution: 384dpi){
}
/* Phones - landscape */
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: landscape) and (min-resolution: 96dpi) {
}
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: landscape) and (min-resolution: 144dpi) {
}
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: landscape) and (min-resolution: 192dpi) {
}
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: landscape) and (min-resolution: 192dpi) {
}
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: landscape) and (min-resolution: 288dpi) {
}
@media only screen and (min-width: 320px) and (max-width: 768px) and (orientation: landscape) and (min-resolution: 384dpi) {
}
/* Tablets - Portrait */
@media only screen and (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) and (min-resolution: 96dpi) {
}
@media only screen and (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) and (min-resolution: 192dpi) {
}
/* Tablets - Landscape */
@media only screen and (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) and (min-resolution: 96dpi) {
}
@media only screen and (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) and (min-resolution: 192dpi) {
}
/* Desktop - Small */
@media only screen and (min-width: 1025px) and (max-width: 1280px) and (min-resolution: 96dpi) {
}
@media only screen and (min-width: 1025px) and (max-width: 1280px) and (min-resolution: 192dpi) {
}
/* Desktop - Medium */
@media only screen and (min-width: 1281px) and (max-width: 1366px) and (min-resolution: 96dpi) {
}
@media only screen and (min-width: 1281px) and (max-width: 1366px) and (min-resolution: 192dpi) {
}
/* Desktop - Large */
@media only screen and (min-width: 1367px) and (max-width: 1680px) and (min-resolution: 96dpi) {
}
@media only screen and (min-width: 1367px) and (max-width: 1680px) and (min-resolution: 192dpi) {
}
/* Desktop - ExtraLarge */
@media only screen and (min-width: 1681px) and (min-resolution: 96dpi) {
}
@media only screen and (min-width: 1681px) and (min-resolution: 192dpi) {
}
Devrai-je utiliser ces 23 requêtes de médias? Est-ce que je vais mal quelque part?
Voici un échantillon de sortie désirée Responsive Site Layout
Pourquoi ne pas utiliser Bootstrap? –
Jetez un coup d'œil à la [mise en page] (https://i.stack.imgur.com/EpLMA.jpg) que j'ai à l'esprit. Est-ce que Bootstrap me permettra de créer ceci? –
Je pense que cela peut être résolu. (Je ne suis pas sûr!) Mais le cadre d'image accroché tout à fait étrange. –