|
HTML과 CSS를 사용하여 반응형 바닥글 디자인
index_Footer tag
<!DOCTYPE html>
<html lang="KO_YOON">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>글쓰기</title>
<style>
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: "poppins", sans-serif;
}
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
}
.container {
max-width: 1440px;
width: 100%;
margin: 0 auto;
padding: 0 2rem;
}
.container h2 {
font-size: 5rem;
color: #ddd;
text-align: center;
padding-bottom: 10rem;
}
footer {
width: 100%;
position: fixed;
bottom: 0;
background: #fff;
box-shadow: -5px -0px 2px rgba(0, 0, 0, 0.5);
}
footer a {
text-decoration: none;
color: #1c2833;
}
.footer_content {
display: grid;
grid-template-columns: repeat(4, 1fr);
padding: 2rem 0;
grid-gap: 2.5rem;
}
.footer_headings {
color: #000;
padding-bottom: 2rem;
position: relative;
}
.footer_headings::after {
content: "";
height: 3px;
background: #e74c3c;
width: 25%;
position: absolute;
top: 30px;
left: 0px;
}
.first_section img {
display: block;
object-fit: cover;
width: 100%;
}
.first_section p {
padding: 1.5rem 0;
text-align: justify;
}
.social_icons {
display: flex;
justify-content: space-between;
}
.social_icons i {
font-size: 1.5rem;
cursor: pointer;
background: #ddd;
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
transform: translateY(0);
transition: all 0.5s ease-in-out;
color: #1c2833;
}
.social_icons i:hover {
transform: translateY(-5px);
}
/* second sections */
.second_section ul {
list-style: none;
}
.second_section ul li {
margin: 1rem 0;
}
.second_section ul li:first-child {
margin-top: 0;
}
/* third section */
.third_section ul {
list-style: none;
}
.third_section ul li {
margin: 1rem 0;
display: flex;
}
.third_section ul li:first-child {
margin-top: 0;
}
.third_section ul li i {
margin-right: 10px;
background: #ddd;
border-radius: 5px;
font-size: 1.5rem;
padding: 1rem;
}
.third_section span {
display: flex;
align-items: center;
justify-content: center;
}
/* fourth section */
.form_control input,
textarea {
outline: none;
border: none;
border: 1px solid #ddd;
padding: 0.5rem 1rem;
margin-bottom: 0.5rem;
width: 100%;
border-radius: 5px;
font-size: 0.9rem;
}
.fourth_section button {
display: block;
width: 100%;
outline: none;
background: #e74c3c;
border: none;
color: #fff;
padding: 0.6rem 0;
cursor: pointer;
border-radius: 5px;
font-size: 0.9rem;
}
.footer_txt {
background: #f0f3f4;
padding: 1.1rem 0;
text-align: center;
box-shadow: -5px -0px 2px rgba(0, 0, 0, 0.5);
</style>
</head>
<body>
<div class="container">
<h2>Website Content</h2>
</div>
<footer>
<div class="container">
<div class="footer_content">
<div class="first_section">
<h3 class="footer_headings">About Us</h3>
<img src="images/logo-1.png" alt="" />
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. A
adipisci minus ratione nulla cum ut repellendus omnis, odit
ducimus nisi?
</p>
<div class="social_icons">
<i class="fa-brands fa-facebook"></i>
<i class="fa-brands fa-twitter"></i>
<i class="fa-brands fa-pinterest"></i>
<i class="fa-brands fa-youtube"></i>
</div>
</div>
<div class="second_section">
<h3 class="footer_headings">Useful links</h3>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
<div class="third_section">
<h3 class="footer_headings">Address</h3>
<ul>
<li>
<i class="fa fa-envelope"></i>
<span>admin@onlineittuts.com</span>
</li>
<li>
<i class="fa-solid fa-location-dot"></i>
<span>A108 Adam Street, New York, NY </span>
</li>
<li>
<i class="fa-solid fa-phone"></i>
<span>+15589 55488 55</span>
</li>
</ul>
</div>
<div class="fourth_section">
<h3 class="footer_headings">Contact Us</h3>
<form action="#">
<div class="form_control">
<input type="text" placeholder="Enter an Email" />
</div>
<div class="form_control">
<textarea
name=""
id=""
cols="10"
rows="5"
placeholder="Write Message....."
></textarea>
</div>
<button type="button">Send</button>
</form>
</div>
</div>
</div>
<div class="footer_txt">
<p>
All rights reservered by
<a href="https://www.onlineittuts.com">OnlineITtuts</a> © 2023.
</p>
</div>
</footer>
</body>
</html>
index_Footer CSS5
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: "poppins", sans-serif;
}
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
}
.container {
max-width: 1440px;
width: 100%;
margin: 0 auto;
padding: 0 2rem;
}
.container h2 {
font-size: 5rem;
color: #ddd;
text-align: center;
padding-bottom: 10rem;
}
footer {
width: 100%;
position: fixed;
bottom: 0;
background: #fff;
box-shadow: -5px -0px 2px rgba(0, 0, 0, 0.5);
}
footer a {
text-decoration: none;
color: #1c2833;
}
.footer_content {
display: grid;
grid-template-columns: repeat(4, 1fr);
padding: 2rem 0;
grid-gap: 2.5rem;
}
.footer_headings {
color: #000;
padding-bottom: 2rem;
position: relative;
}
.footer_headings::after {
content: "";
height: 3px;
background: #e74c3c;
width: 25%;
position: absolute;
top: 30px;
left: 0px;
}
.first_section img {
display: block;
object-fit: cover;
width: 100%;
}
.first_section p {
padding: 1.5rem 0;
text-align: justify;
}
.social_icons {
display: flex;
justify-content: space-between;
}
.social_icons i {
font-size: 1.5rem;
cursor: pointer;
background: #ddd;
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
transform: translateY(0);
transition: all 0.5s ease-in-out;
color: #1c2833;
}
.social_icons i:hover {
transform: translateY(-5px);
}
/* second sections */
.second_section ul {
list-style: none;
}
.second_section ul li {
margin: 1rem 0;
}
.second_section ul li:first-child {
margin-top: 0;
}
/* third section */
.third_section ul {
list-style: none;
}
.third_section ul li {
margin: 1rem 0;
display: flex;
}
.third_section ul li:first-child {
margin-top: 0;
}
.third_section ul li i {
margin-right: 10px;
background: #ddd;
border-radius: 5px;
font-size: 1.5rem;
padding: 1rem;
}
.third_section span {
display: flex;
align-items: center;
justify-content: center;
}
/* fourth section */
.form_control input,
textarea {
outline: none;
border: none;
border: 1px solid #ddd;
padding: 0.5rem 1rem;
margin-bottom: 0.5rem;
width: 100%;
border-radius: 5px;
font-size: 0.9rem;
}
.fourth_section button {
display: block;
width: 100%;
outline: none;
background: #e74c3c;
border: none;
color: #fff;
padding: 0.6rem 0;
cursor: pointer;
border-radius: 5px;
font-size: 0.9rem;
}
.footer_txt {
background: #f0f3f4;
padding: 1.1rem 0;
text-align: center;
box-shadow: -5px -0px 2px rgba(0, 0, 0, 0.5);
}
index_Footer CSS5
@media (max-width: 768px) {
body {
min-height: 50vh;
}
.footer_content {
grid-template-columns: repeat(2, 1fr);
grid-gap: 4rem;
padding: 3rem 0;
}
.social_icons i {
font-size: 1.3rem;
width: 45px;
height: 45px;
}
footer {
position: absolute;
top: 50%;
}
.container h2 {
font-size: 4rem;
padding-bottom: 5rem;
}
}
@media (max-width: 568px) {
.footer_content {
grid-template-columns: repeat(1, 1fr);
grid-gap: 3rem;
padding: 2.5rem 0;
}
.container h2 {
font-size: 3rem;
padding-bottom: 4rem;
}
.social_icons i {
font-size: 1rem;
width: 35px;
height: 35px;
}
footer {
position: absolute;
top: 30%;
}
}
index_Footer tag
grammarly.com 22時55分
|
첫댓글 https://arhaanali.medium.com/responsive-footer-design-using-html-and-css-9a8773a5f84b