わからないこと
自力でメディアクエリを適用させようとコードを書いていたのですが、どうしても適用されずに解決できなかったのでお伺いしたいです。今回はcssファイルではなくhtmlのhead内に直接書き込んでいます。
下記にコードの一部をコピペしました。もしお分かりの方がいらっしゃれば、ご教示いただければと思います。
解決したい点としましては、スマホ用(600px)のスタイルを適用したいです。
</style>a{ display: block; background-color:blue; color:white; font-size:20px; text-align: center; border-radius:5px text-decoration:none!important; max-width:300px; animation: prunprun 2.2s ease-in infinite; -webkit-animation:prunprun 2.2s ease-in infinite; -moz-animation:prunprun 2.2s ease-in infinite; -o-animation:prunprun 2.2s ease-in infinite; -ms-animation:prunprun 2.2s ease-in infinite; } @@keyframes prunprun{ 48%, 62%{transform: scale(1.0,1.0);} 50%{transform: scale(1.1,0.9);} 56%{transform: scale(0.9,1.1)translate(0,-5px);} 59%{transform:scale(1.0,1.0)translate(0,-3px); } } @-webkit-keyframes prunprun{ 48%,62%{-webkit-transform:scale(1.0,1.0);} 50%{transform: scale(1.1,0.9);} 56%{transform: scale(0.9,1.1)translate(0,-5px);} 59%{transform:scale(1.0,1.0)translate(0,-3px); } } a:hover{ background-color:darkblue; color:white; } a:active{ background-color:skyblue; color:white; } @media screen and (max-width:600px;) { body{font-size:1.6vw;} h1{font-size:3.6vw;} h2{font-size:2.4vw;} figcaption{font-size:1.2vw;} a{font-size:5.0vw;} }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/06 11:18