CSSで波紋を作りたいと思い、ネット上を検索し、CSSをコピペ下のですが、
firefoxでしか動きません。
どこが問題なのかわかりません。
試したこと
ベンダープレフィックスはつけてみましたが動きません。
各ブラウザのキャシュは消しました。
html, body { margin: 0; background: #45c2c5; } div { display: block; position: absolute; top: 50%; left: 50%; margin: -20px 0 0 -20px; width: 40px; line-height: 40px; } h1 { font-size: 50px; color: white; text-shadow: 0 2px 0 #8ed2d4, 2px 3px 15px rgba(0, 0, 0, 0.5); } .ripple, .ripple:before, .ripple:after { display: block; border-radius: 2px; width: 2px; height: 2px; animation: rip 6s infinite ease-out; } .ripple { position: absolute; z-index: -1; top: 40px; left: 15px; } .ripple:before, .ripple:after { content: ""; position: absolute; } .ripple:before { -webkit-animation-delay: 0.2s; top: 5px; left: 25px; } .ripple:after { -webkit-animation-delay: 0.8s; top: 25px; left: 0; } @keyframes rip { 0% { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent, 0 0 0 0 transparent, 0 0 0 0 transparent; } 15% { box-shadow: 0 0 0 0 #45c2c5, 0 0 0 0 rgba(255, 255, 255, 0.4), 0 0 0 0 #45c2c5, 0 0 0 0 rgba(0, 0, 0, 0.08); } 100% { box-shadow: 0 0 40px 200px #45c2c5, 0 0 10px 210px transparent, 0 0 30px 220px #45c2c5, 0 0 5px 230px transparent; } }
html
1 2<html> 3 4<link type="text/css" rel="stylesheet" href="css/h_style.css" /> 5 6 7<body> 8 9<div> 10 <h1>波紋</h1> 11 <span class="ripple"></span> 12</div> 13</body> 14 15</html>
回答1件
あなたの回答
tips
プレビュー