0
これらの2つの画像を右に揃えたいが、それらを別々の線にしたい。今私が考えることができる唯一の方法は、画像の1つに対して非常に大きなマージンですが、より良い方法があるかどうか疑問に思っています。右側のCSSで2つの画像を別々の線で整列する
右の最初の画像の横に段落が表示されます。 また、段落の背景がスクロールすると変わりますが、色の変化をテキストの周りに限定したいと思います。
これは私のコードで、このコードで
をしたい任意の画像を使用します。
<!DOCTYPE HTML>
<html>
<head>
<title> Stack Overflow Question </title>
<link rel="stylesheet" type="text/css" href="./css/q7.css"></link>
</head>
<body>
<h1> Holla lolla lolla la </h1>
<figure id=real>
<img src="images/RealDog.jpg" </img>
<figcaption>Figure 1. Real Dog</figcaption>
</figure>
<p id="Gar"> Gar Gar Gar </p>
<p id="lol"> lol lol lol </p>
<figure id=fake>
<img src="images/FakeDog.jpg"></img>
<figcaption>Figure 2. Fake Dog</figcaption>
</figure>
</body>
</html>
CSSファイル:すべての
body {
font-family: sans-serif;
font-weight: normal;
background-color: #EDEDED;
}
h1 {
color: blue;
font-weight: normal;
}
img {
height: 100px;
/*display: block;*/
}
p:hover {
background-color:white;
}
#Gar {
float: right;
color: blue;
margin-right: 100px;
}
#lol {
float: right;
color: blue;
margin-right: 100px;
}
figure {
float: right;
margin-left: 1000px;
}
あなたは 'gar'と' lol'テキストを – affaz