0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

相対的な大きさを指定する

Posted at

#相対的な大きさの指定
ボックスのwidthheightpxではなく%で指定すると、親要素に対してどのくらいの幅や高さを持つか指定することができます。

index.html
<div class="parent">
 <div class="child"></div>
 <div class="child"></div>
</div>
style.css
.child {
 width: 50%;
}
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?