Skip to content

Instantly share code, notes, and snippets.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>
.multiplebgs header {
/* Les backgrounds multiples sont supportés */
}
.no-multiplebgs header {
/* Les backgrounds multiples ne sont pas supportés */
}
if (Modernizr.geolocation){
// La géolocalisation est supportée
}
else {
// La géolocalisation n'est pas supportée
}
document.createElement("header");
div{
background-color: rgba(255, 0, 0, 0.5);
}
p {
column-count:2;
}
body{
background-color:green;
}
@media screen and (max-device-width: 600px) {
/* Style appliqué uniquement sur les écrans de moins de 600px de largeur */
body{
background-color:red;
a {
color: red;
}
a:not(.notme) {
color: green;
}
<a href="#" class="notme">Je suis rouge</a>
<a href="#">Je suis vert</a>
<a href="#">Je suis vert</a>
a[href^="http://"]{
color:red;
}