LoginSignup
0
0

More than 3 years have passed since last update.

flex-direction: column を使ってみる

Posted at

flex-direction: column を使ってみる

↓これと同じものを作ってみる

スクリーンショット 2020-11-17 23.38.06.png
https://atom.io/

とりあえず要素を並べる

.parent {
    flex-direction: column;
}
import React from 'react';
import './AtomPage.css';

export const AtomPage = () => {
    return (
        <>
            <ul className="parent">
                <li>ATOM</li>
                <li>1.53.0</li>
                <li>macOS</li>
                <a href="">Download</a>
            </ul>
        </>
    )
}

スクリーンショット 2020-11-17 23.42.59.png

形を整える

.parent {
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid #4e4b4d;
    list-style: none;
    display: inline-flex;
    padding: 0;
    text-align: center;
    color: #efdab9;
}

.item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2em;

}

.item a {
    text-decoration: none;
    color: #efdab9;
}

.parent li+li {
    border-top: 1px solid #4e4b4d;
}

body {
    background-color: #343233;
}
import React from 'react';
import './AtomPage.css';

export const AtomPage = () => {
    return (
        <>
            <ul className="parent">
                <li className="item">ATOM</li>
                <li className="item">1.53.0</li>
                <li className="item">macOS</li>
                <li className="item"><a href="">download</a></li>
            </ul>
        </>
    )
}

スクリーンショット 2020-11-18 0.02.33.png

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