Ich habe dieses kleine Icon-Menü mit Hilfe eines Tutorials erstellt und versuche es reaktionsfähig zu machen, aber es funktioniert nicht.Wie kann ich diese Medienabfrage durchführen, um das Menü vertikal zu sehen?
Wenn die Breite 400px ist, möchte ich das Menü vertikal sein.
body {
margin: 0px;
}
.cuadro {
width: 100%;
background-color: pink;
overflow: auto;
}
.cuadro a {
float: left;
text-align: center;
width: 20%;
padding: 12px 0;
transition: all 0.3s ease;
color: white;
font-size: 36px;
}
.cuadro a:hover {
background-color: green;
}
.active {
background-color: purple !important;
}
@media only screen and (max-width: 414px) {
body {
margin: 0px;
}
.cuadro {
position: fixed;
width: 414px;
text-align: center;
color: white;
font-size: 36px
}
.cuadro a {
background-color: pink;
display: block;
padding: 16px;
color: white;
}
.cuadro a:hover {
transition: all 0.3s ease;
background-color: green;
}
.active {
background-color: purple !important;
}
}
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta charset="utf-8">
<meta content="viewport" content="width=device-width initial-scale=1">
<script src="https://use.fontawesome.com/ea180863a6.js"></script>
</head>
<body>
<div class="cuadro">
<a class="active" href="#"><i class="fa fa-skype" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-spotify" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-snapchat-ghost" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-whatsapp" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-vk" aria-hidden="true"></i></a>
</div>
</body>
</html>
Was mache ich falsch?
Danke, ich liebe diese Social-Media-Website :) –
@OlmedoGuzman willkommen :) Ich auch Rektifikation hinzugefügt, Sie einen Blick haben kann;) –
es nicht in gchrome funktioniert. : s –