0
0

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 1 year has passed since last update.

ボタン横並び

Last updated at Posted at 2021-11-21

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="style.css">
    <title>Document</title>
</head>
<style>
    
</style>
<body>
    
    <div class="wrap">
        <div class="content">
            <label for="temp">samplesamplesamplesample<br><br>test_test</label>
            <div class="btn01">
                <input type="btn" value="ボタン1">
                <input type="btn" value="ボタン2">
                <input type="btn" value="ボタン3">
            </div>
        </div>
    </div>
</body>
</html>

CSS

* {
    margin: 0;
    padding: 0;
} 

.wrap{
    height: 100vh;
    width: 100wh;
    background-color: grey;
    display: flex;
    justify-content: center;
    align-items: center;
}
.content {
    height: 250px;
    width: 400px;
    background-color: cadetblue;
    
}
.content>label{
    padding: 5px;
    box-sizing: border-box;
    border-radius: 4%;
    display: block;
    width: 100%;
    height: 100px;
    background-color: chocolate;
}
.btn01 {
    height: calc(100% - 100px);
    display: flex;
    justify-content: space-around;
    align-items: center;

}
.btn01 input{
    background-color: rgb(163, 241, 241);
    color: white;
    text-align: center;
    border: none;
    border-radius: 6px;
    display: block;
    width: 30%;
    height: 50px;
}

結果

btn_sample01.jpg

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?