前提・実現したいこと
JavaScript(HTML&CSS)でマウスオーバーの中に画像を入れて、画像をアニメーションで動く様なソフトを作っています。
初心者で既存のソースコードを使用し、作っています。
発生している問題・エラーメッセージ
エラーメッセージ
該当のソースコード
<html> <head> <style> .tooltip3{ position: relative; cursor: pointer; display: inline-block; } .tooltip3 p{ margin:0; padding:0; } .description3 { display: none; position: absolute; padding: 10px; font-size: 12px; line-height: 3em; color:#000 ; border-radius: 5px; background: #CCCCCC; width: 400px; } .description3:before { content: ""; position: absolute; top: -24px; right: 60%; border: 15px solid transparent; border-top: 15px solid #CCCCCC; margin-left: -15px; transform: rotateZ(180deg); } .tooltip3:hover .description3{ display: inline-block; top: 30px; left: 0px; } </style> <style> .box { width: 100px; height: 100px; background: #DEB887; animation: none running; } </style> <style type="text/css"> img.example1{ width: 96px; height: 65px; float: left; } </style> </head> <body> <div class="tooltip3"> <p>$fruit = "りんご";</p> <div class="description3"> 『りんご』を『fruit』の箱に代入 <div class="box"></div> <figure class="img-flex-1"> <img src="りんご.png" alt="[イラスト]" class="example1"> </figure> </div> </div> <div class="tooltip3"> <p>echo $fruit ;</p> <div class="description3">説明を入力してください。 </div> </div> </body> </html>
試したこと
画像を横並びにしたいのですが、他のサイトを見てコードを入れてみたのですができませんでした。
マウスオーバーの中に画像を入れることはできたのですが、
現状況は2つの画像が立て並びで下の画像が少しだけ右に動きました。
補足情報(FW/ツールのバージョンなど)
Windows7、メモ帳を使用して作っています。
回答1件
あなたの回答
tips
プレビュー