안녕하세요! 반응형 3단가로배열 모바일에서는 세로 진열

안녕하세요! 반응형 3단가로배열 모바일에서는 세로 진열

작성일 2024.02.14댓글 2건
    게시물 수정 , 삭제는 로그인 필요




안녕하세요! 다른질문에서 너무 완벽한 답글을 달아주셔서 1:1로 새질문드립니다 ㅜㅜ

텍스트+버튼식 3단 가로배열을 만들려고합니다!
모바일버전 에서는 너무 좁게 배치되어서 글씨가 따닥따닥 붙어 보기안좋은 상황입니다

가로영역이 좁아지면 (파란네모)세로로 배열될 수 있도록 할 수 있을까요?
테블릿 기기까지는 pc처럼 보이게 하고싶어서 가로를 750px 정도로 가정하고
750px이하가 되면 세로로 정렬되게끔 하고싶습니다

소스에서 수정하거나, 새 구성으로 알려주실 수 있으면 참고하겠습니다
초보라서 여기저기 주워다 썼는데 불필요한 요소가 있을 수 있는데 양해부탁드립니다 ㅠㅠ

--소스--

<!--3단 구성-->
<section style='color: rgb(0, 0, 0); font-family: "Malgun Gothic"; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>
    <div class="container " style="text-align: center; display: flex; justify-content: space-around;">
        <div class="row" style="text-align: center;">
            <p style="display: block; margin: 0px; line-height: 1.5; text-align: center;">제목1</p>
            <h3 style="display: block; font-size: 1.17em; margin: 0.83em 0px; font-weight: bolder; text-align: center;">텍스트1</h3>
            <a href="버튼링크1"><div class="col-lg-4 col-md-6 col-sm-12 text-center" style="text-align: center;">
            <img data-fr-image-pasted="true" class="rounded-circle fr-fic fr-dii" alt="100x50" src="버튼이미지.jpg" data-holder-rendered="true" style="position: relative; max-width: 100%; display: inline-block; float: none; vertical-align: bottom; margin-left: 0px; margin-right: 0px; width: 100px; height: 50px;"></a>
            </div>
        </div>
        <div class="row" style="text-align: center;">
            <p style="display: block; margin: 0px; line-height: 1.5; text-align: center;">제목2</p>
            <h3 style="display: block; font-size: 1.17em; margin: 0.83em 0px; font-weight: bolder; text-align: center;">텍스트2</h3>
            <a href="버튼링크2"><div class="col-lg-4 col-md-6 col-sm-12 text-center" style="text-align: center;">
            <img data-fr-image-pasted="true" class="rounded-circle fr-fic fr-dii" alt="100x50" src="버튼이미지.jpg" data-holder-rendered="true" style="position: relative; max-width: 100%; display: inline-block; float: none; vertical-align: bottom; margin-left: 0px; margin-right: 0px; width: 100px; height: 50px;"></a>
            </div>
        </div>
        <div class="row" style="text-align: center;">
            <p style="display: block; margin: 0px; line-height: 1.5; text-align: center;">제목3</p>
            <h3 style="display: block; font-size: 1.17em; margin: 0.83em 0px; font-weight: bolder; text-align: center;">텍스트3</h3>
            <a href="버튼링크3"><div class="col-lg-4 col-md-6 col-sm-12 text-center" style="text-align: center;">
            <img data-fr-image-pasted="true" class="rounded-circle fr-fic fr-dii" alt="100x50" src="버튼이미지.jpg" data-holder-rendered="true" style="position: relative; max-width: 100%; display: inline-block; float: none; vertical-align: bottom; margin-left: 0px; margin-right: 0px; width: 100px; height: 50px;"></a>
            </div>
        </div>
    </div>
</section>
<div id="wrapper" style="text-align: center;">
    <main id="content">
        <div class="section-heading">
            <br>
        </div>
        <style>
            .grid-image {
                display: flex; flex-wrap: wrap; align-items: flex-start; margin: 30px 0;
            }
           
            .grid-image img {
                width: calc(33.333% - 10px); margin: 0 15px 15px 0;
            }
           
            .grid-image img:nth-of-type(3n),
            .grid-image img:last-child {
                margin-right: 0;
            }
           
            @media screen and (max-width:640px) {
                .grid-image img {
                    width: calc(100% - 15px);
                }
            }
           
            @media screen and (max-width:480px) {
                .grid-image img: nth-of-type(2n) {
                    margin-right: 0;
                }
                .grid-image img:nth-of-type(3n) {
                    margin-right: 15px;
                }
            }

        </style>
    </main>
</div>



profile_image 익명 작성일 -

부트스트랩 같은 그리드 시스템이 필요 없어면

class="col-lg-4 col-md-6 col-sm-12 text-center" 부분은 삭제하세요.

부트스트랩이 있어면 css 가 코드가 충돌해서 재대로 적용이 안됩니다.

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>test</title>

<style>

.container{

text-align: center;

display: flex;

justify-content: space-around;

}

.grid-image {

display: flex; flex-wrap: wrap; align-items: flex-start; margin: 30px 0;

}

.grid-image img {

width: calc(33.333% - 10px); margin: 0 15px 15px 0;

}

.grid-image img:nth-of-type(3n),

.grid-image img:last-child {

margin-right: 0;

}

@media screen and (max-width:750px) {

.container{

flex-wrap:wrap;

}

.container .row{

width:100%;

flex-wrap:wrap;

}

}

@media screen and (max-width:640px) {

.grid-image img {

width: calc(100% - 15px);

}

}

@media screen and (max-width:480px) {

.grid-image img: nth-of-type(2n) {

margin-right: 0;

}

.grid-image img:nth-of-type(3n) {

margin-right: 15px;

}

}

</style>

</head>

<body>

<section style='color: rgb(0, 0, 0); font-family: "Malgun Gothic"; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>

<div class="container">

<div class="row" style="text-align: center;">

<h3 style="display: block; margin: 0px; line-height: 1.5; text-align: center;font-size: 1.5em;">제목1</h3>

<p style="display: block; font-size: 1.17em; margin: 0.83em 0px; font-weight: bolder; text-align: center;">텍스트1</p>

<a href="버튼링크1"><div class="col-lg-4 col-md-6 col-sm-12 text-center" style="text-align: center;">

<img data-fr-image-pasted="true" class="rounded-circle fr-fic fr-dii" alt="100x50" src="버튼이미지.jpg" data-holder-rendered="true" style="position: relative; max-width: 100%; display: inline-block; float: none; vertical-align: bottom; margin-left: 0px; margin-right: 0px; width: 100px; height: 50px;"></a>

</div>

</div>

<div class="row" style="text-align: center;">

<h3 style="display: block; margin: 0px; line-height: 1.5; text-align: center;font-size: 1.5em;">제목2</h3>

<p style="display: block; font-size: 1.17em; margin: 0.83em 0px; font-weight: bolder; text-align: center;">텍스트2</p>

<a href="버튼링크2"><div class="col-lg-4 col-md-6 col-sm-12 text-center" style="text-align: center;">

<img data-fr-image-pasted="true" class="rounded-circle fr-fic fr-dii" alt="100x50" src="버튼이미지.jpg" data-holder-rendered="true" style="position: relative; max-width: 100%; display: inline-block; float: none; vertical-align: bottom; margin-left: 0px; margin-right: 0px; width: 100px; height: 50px;"></a>

</div>

</div>

<div class="row" style="text-align: center;">

<h3 style="display: block; margin: 0px; line-height: 1.5; text-align: center;font-size: 1.5em;">제목3</h3>

<p style="display: block; font-size: 1.17em; margin: 0.83em 0px; font-weight: bolder; text-align: center;">텍스트3</p>

<a href="버튼링크3"><div class="col-lg-4 col-md-6 col-sm-12 text-center" style="text-align: center;">

<img data-fr-image-pasted="true" class="rounded-circle fr-fic fr-dii" alt="100x50" src="버튼이미지.jpg" data-holder-rendered="true" style="position: relative; max-width: 100%; display: inline-block; float: none; vertical-align: bottom; margin-left: 0px; margin-right: 0px; width: 100px; height: 50px;"></a>

</div>

</div>

</div>

</section>

<div id="wrapper" style="text-align: center;">

<main id="content">

<div class="section-heading">

<br>

</div>

</main>

</div>

</body>

</html>

profile_image 익명 작성일 -

안녕하세요, 반응형 3단 가로 배열에 대한 질문에 대한 답변입니다.

CSS 미디어 쿼리를 이용하면 사용자가 뷰포트 또는 기기 크기에 따라 CSS를 변경할 수 있어 반응형 웹 디자인을 구현할 수 있습니다.

3단 가로 배열을 하려면 그리드나 플렉스박스를 이용하는 것이 일반적입니다.

모바일에서는 세로 배열을 하려면 미디어 쿼리에서 특정 뷰포트를 기준으로 콘텐츠를 재배열하도록 설정하면 됩니다.

그리고 현재 웹 트렌드는 반응형 웹으로 이동하고 있습니다.

반응형 웹은 디바이스의 화면 크기와 해상도에 따라 자동으로 화면을 조정해 사용자에게 최적화된 화면을 제공하는 기술입니다.

이를 통해 하나의 홈페이지로 다양한 디바이스에서의 효과적인 웹사이트 구축이 가능해집니다.

홈페이지 제작 업체를 찾으시는 분들에게는 실제 홈페이지 제작 포트폴리오와 비용을 공개한 업체, 유지보수 A/S 내역을 실시간으로 공개하고 있는 업체를 추천합니다.

그리고 홈페이지 제작을 계획하시는 분들에게 한 가지 팁을 드리자면, 처음부터 메뉴 구성(사이트 맵)을 확실히 정해 두는 것이 좋습니다.

이는 전체적인 웹사이트의 구조를 이해하는 데 도움이 되고, 그에 따른 디자인과 기능 개발을 보다 효율적으로 할 수 있기 때문입니다.

제가 추천드릴만한 홈페이지제작 업체는 "디웹스"입니다.

2015년 설립해서 올해로 10년차를 맞이한 홈페이지제작 전문 업체로, 안정적인 서비스 제공으로 많은 고객들에게 신뢰를 받고 있습니다.

다양한 클라이언트의 요구사항에 맞춘 맞춤형 서비스를 제공하며, 고객의 성공이 바로 디웹스의 성공이라는 기업 철학을 가지고 있으니 홈페이지 제작의 업체를 선택하시는데 참고해보세요..

홈페이지제작 관련해 견적 상담을 원하시면 하단 링크를 통해 문의를 남겨주세요.

https://www.dwebs.kr/?smtg_ad=2807

답변이 도움이 되셨으면 좋겠네요~ 조금이나마 도움이 되셨다면 답변확정 부탁 드립니다^^.

자바스크립트 반응형 웹 transform...

예를들어 가로 1920px 세로 1080px인 웹페이지가 있고... 안녕하세요. 소스놀이터란 이름으로 유튜브에서 강의를... 말씀하신 내용대로 구현된 반응형 웹들이 많이...

반응형 홈페이지와 일반형 홈페이지 질문...

안녕하세요 인터넷 쇼핑몰을 열기 위해 한 업체에 홈페이지... 홈페이지를 모바일로 봤을 때 작게 보이더라도 가로로는 전체 구성이 다 보이게 하는것이 보편적입니다. 세로는...

워드프레스 반응형 원리

고수님들께 여쭤봅니다~ 반응형 웹기반 워드프레스라는... 모양이나, 배열 등이 상호 다르게 나타나더라구요.. 어느... 모바일용 홈페이지 특징은 가로 세로 사이즈를 안...

홈페이지 제작 중인데 폰트적용이...

... 모바일 화면, 태블릿 화면, 데스크탑 화면 등 화면의 가로세로의 사이즈가 기기 마다 천차 만별이기 때문에, 사실상 모든 기기에서 보기 좋은 반응형을 구현하는...

div 3단 정렬시 리사이징

안녕하세요. 얼마 못 배운 (^^) 홈페이지 초보자입니다. 다름이 아니구요. div로 3단 가로 배열을... 단 (1),(3)은 세로정렬이 가운데이고 (2)는 세로정렬이...

안녕하세요. 반응형 웹에 관해 질문...

... 드린것처럼 반응형 웹으로 구현을 해야 문제가 해결 될거 같은데요.. 이미지맵 태그로 구현했을 때 모바일나... 크기는 가로 1919픽셀 세로 970픽셀입니다. 너무 기초가...