Cute Running Puppy
본문 바로가기
개발일기

네컷 사진 두 줄로 보이기

by 징구짱 2023. 2. 7.
728x90

2023.02.02

저번 시간에 네컷사진을 만들어보았는데

한줄로 네장을 넣으니 사진이 작아져서 사진이 넣기 힘들었다

그래서 두칸씩 두줄로 바꿔보려고 한다!

https://pingu514.tistory.com/14

 

VS Code 네컷 사진 만들기

2023.02.01 VS Code 다운로드 https://code.visualstudio.com/Download Download Visual Studio Code - Mac, Linux, Windows Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experien

pingu514.tistory.com

 

 

전체와 이미지 두개씩 class로 묶어주었다.

<div class="container">
    <div class="photo-row">
        <div id="image1" class="photo-frame"> ... </div>
        <div id="image2" class="photo-frame"> ... </div>
    </div>
    <div class="photo-row">
        <div id="image3" class="photo-frame"> ... </div>
        <div id="image4" class="photo-frame"> ... </div>
        </div>
    </div>
</div>

 

photo-row클래스는 flex-direction: row;를 설정하여 사진이 한 줄에 보이게 했다.

.photo-row {
            display: flex;
            flex-direction: row;
            align-items: center;
        }

 

원래는 container클래스에 넓이를 설정해서 보여줬는데, 사진의 사이즈를 지정해서 보여주었다.

.container {
    height: 100%;
    padding: 30px;
    ...
}

.photo-frame {
    margin: 10px;
    height: 240px;
    width: 180px;
    ...
}

 

결과물!

https://jinguleee.github.io/4cut/

 

Document

오마카세...냐미 포토존..?

jinguleee.github.io

728x90

'개발일기' 카테고리의 다른 글

포트 죽이기  (0) 2023.02.27
깃허브 연동 연습 (파이참, 깃)  (0) 2023.02.13
버킷리스트 수정하기  (0) 2023.02.07
github로 배포하기  (0) 2023.02.01
VS Code 네컷 사진 만들기  (0) 2023.02.01