ํฐ์คํ ๋ฆฌ ๋ธ๋ก๊ทธ ์นดํ ๊ณ ๋ฆฌ๋ณ ๋ง์ถค ๋ฒํผ ์๋ ์์ฑ๋ฐฉ๋ฒ
๋ธ๋ก๊ทธ ์ด์์ ํ๋ค ๋ณด๋ฉด, ํน์ ์นดํ ๊ณ ๋ฆฌ ํ์ด์ง์์๋ง ํน๋ณํ๊ฒ ์๋ด(๋ค๋น๊ฒ์ด์ ) ๋ฒํผ์ ๋์ฐ๊ณ ์ถ์ ๋๊ฐ ๋ง์ต๋๋ค. ์๋ฅผ ๋ค์ด, SEO ๊ด๋ จ ์นดํ ๊ณ ๋ฆฌ ํ์ด์ง์์๋ ์ ๋์ผ์ค ์ต์ ํ ๋ฐ๋ก๊ฐ๊ธฐ ๋ฒํผ์, ์ ๋์ผ์ค ๊ด๋ จ ์นดํ ๊ณ ๋ฆฌ ํ์ด์ง์์๋ ๊ด๊ณ ์ฝ๋ ๊ฐ์ด๋ ๋ฒํผ์ ๋ณด์ฌ์ฃผ๋ ๋ฐฉ์์ ๋๋ค.
ํ์ง๋ง ๋งค๋ฒ HTML์ ๋ฒํผ ์ฝ๋๋ฅผ ์ง์ ๋ฃ๊ณ ๊ด๋ฆฌํ๋ ๊ฒ์ ๋ฒ๊ฑฐ๋กญ๊ณ ์ค์ํ๊ธฐ ์ฝ์ต๋๋ค. ๊ทธ๋์ ์ด๋ฒ ๊ธ์์๋ ์นดํ ๊ณ ๋ฆฌ URL์ ๋ฐ๋ผ ์๋์ผ๋ก ๋ฒํผ์ ์์ฑํ๊ณ ์ง์ ์์น์ ๋ฃ์ด์ฃผ๋ ์๋ฐ์คํฌ๋ฆฝํธ ์ฝ๋๋ฅผ ์๊ฐํฉ๋๋ค.
ํฐ์คํ ๋ฆฌ ์ด์์๋ฅผ ์ํ ์นดํ ๊ณ ๋ฆฌ๋ณ ์๋ ๋ฒํผ ์์ฑ
์ด์์๊ฐ ๋จ์ํ ์ค์ ๋ง ๋ณ๊ฒฝํ๋ฉด ๋ค์ํ ์นดํ ๊ณ ๋ฆฌ์ ๋ง๋ ๋ฒํผ์ ์๋์ผ๋ก ๊ด๋ฆฌํ ์ ์์ด, ๋ธ๋ก๊ทธ ์ด์์ ์๊ธดํ๊ฒ ์ฌ์ฉํ ์ ์์ต๋๋ค.
1. ์นดํ ๊ณ ๋ฆฌ๋ณ ๋ง์ถคํ ์๋ ๋ฒํผ ํ์์ฑ
- ๋ฐฉ๋ฌธ์ ๋ง์ถคํ UX ์ ๊ณต
ํน์ ์ฃผ์ ๋ณ ๋๋ฉ ํ์ด์ง๋ ๊ณต์ง, ๊ฐ์ด๋ ํ์ด์ง๋ก ์์ฐ์ค๋ฝ๊ฒ ์ ๋ํด ์ฒด๋ฅ ์๊ฐ์ ๋๋ฆด ์ ์์ต๋๋ค. - ํจ๊ณผ์ ์ธ ๋ด๋ถ ๋งํฌ ๊ด๋ฆฌ
๊ฒ์์์ง ์ต์ ํ(SEO)์์๋ ๊ด๋ จ ์ฝํ ์ธ ๋ผ๋ฆฌ ์์ฐ์ค๋ฝ๊ฒ ์ฐ๊ฒฐํด ์ฃผ๋ ๋ด๋ถ๋งํฌ ๊ตฌ์กฐ๊ฐ ์ค์ํฉ๋๋ค. ์นดํ ๊ณ ๋ฆฌ๋ณ ๋ฒํผ์ ํตํด ๋ฐฉ๋ฌธ์์ ํ์ ๊ฒฝ๋ก๋ฅผ ์ ๋ํ๋ฉด SEO ์ ์ ํฅ์์ ๊ธ์ ์ ์ ๋๋ค. - ์ด์ ํธ์์ฑ ์ฆ๋
์๋ฐฑ ๊ฐ ๊ธ์ ์ผ์ผ์ด ์์ ํ ํ์ ์์ด, ์ฝ๋ ํ ๊ตฐ๋ฐ๋ง ์๋ด๋ ์ ์นดํ ๊ณ ๋ฆฌ์ ๋ฐ๋ก ๋ฐ์๋ฉ๋๋ค.
2. ์๋ฐ์คํฌ๋ฆฝํธ ๊ธฐ๋ฐ ์๋ ๋ฒํผ ์์ฑ ์ฝ๋ ์๊ฐ
์๋ ์ฝ๋๋ ์ด์์๊ฐ ์ค์ ํ ์นดํ
๊ณ ๋ฆฌ URL ์กฐ๊ฑด์ ๋ง์ถฐ, ์ง์ ํ <div> ์์์ ์๋์ผ๋ก ๋ฒํผ์ ์์ฑํ๊ณ ์ฝ์
ํด ์ค๋๋ค.
<!-- ๋ฉ๋ด ์์ญ (์ํ๋ ์์น์ ์ถ๊ฐ) -->
<div id="menu1"></div>
<div id="menu2"></div>
<!-- ๋ฒํผ ์คํ์ผ -->
<style>
.dark-rounded-btn {
display: inline-block;
padding: 12px 24px;
background-color: #555;
color: #fff;
border-radius: 30px;
text-decoration: none;
font-size: 16px;
font-weight: 500;
transition: background-color 0.3s, transform 0.2s;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.dark-rounded-btn:hover {
background-color: #777;
transform: translateY(-2px);
}
</style>
<!-- ์๋ฐ์คํฌ๋ฆฝํธ๋ก ๋ฒํผ ์๋ ์์ฑ -->
<script>
document.addEventListener("DOMContentLoaded", function () {
const currentUrl = window.location.href;
// ์ค์ : ์นดํ
๊ณ ๋ฆฌ ์ฃผ์ + ๋ฒํผ ๋ฃ์ ์์น ID + ์ด๋ํ ๋งํฌ + ๋ฒํผ ํ
์คํธ
const buttonConfigs = [
{
urlContains: "/category/SEO",
targetId: "menu1",
linkUrl: "https://ํ์ด์ง ์ฃผ์1",
buttonText: "์ ๋์ผ์ค ์ต์ ํ ๋ฐ๋ก๊ฐ๊ธฐ"
},
{
urlContains: "/category/Adsense",
targetId: "menu2",
linkUrl: "ํ์ด์ง ์ฃผ์2",
buttonText: "์ ๋์ผ์ค ์ฝ๋ ๊ฐ์ด๋"
}
// ์ถ๊ฐ ๊ฐ๋ฅ: ์ํ๋ ๋งํผ ๋ณต์ฌํด์ ๊ตฌ์ฑ ๊ฐ๋ฅ
];
buttonConfigs.forEach(cfg => {
if (currentUrl.includes(cfg.urlContains)) {
const targetEl = document.getElementById(cfg.targetId);
if (targetEl) {
const button = document.createElement("a");
button.href = cfg.linkUrl;
button.target = "_blank";
button.className = "dark-rounded-btn";
button.innerText = cfg.buttonText;
targetEl.appendChild(button);
}
}
});
});
</script>
์ฃผ์ ๊ธฐ๋ฅ
- urlContains ๊ฐ์ผ๋ก ํ์ฌ ํ์ด์ง URL์ ํน์ ์นดํ ๊ณ ๋ฆฌ ์ฃผ์๊ฐ ํฌํจ๋๋์ง ํ๋จ
- ์กฐ๊ฑด์ ๋ง์ผ๋ฉด targetId์ ํด๋นํ๋ div์ ๋ฒํผ์ ์์ฑํ์ฌ ์ฝ์
- ๋ฒํผ์ ์ด์์๊ฐ ์ง์ ํ ๋งํฌ(linkUrl)์ ํ ์คํธ(buttonText)๋ก ์๋ ์์ฑ
- ๋คํฌ ๋ชจ๋์ ์ด์ธ๋ฆฌ๋ ๋ผ์ด๋ ์คํ์ผ ๋ฒํผ ๊ธฐ๋ณธ ์ ๊ณต
3. ํ์ฉ ์์
- SEO ์นดํ ๊ณ ๋ฆฌ ๋ฐฉ๋ฌธ ์ ์์ตํ ๋ธ๋ก๊ทธ ์ต์ ํ ํ์ด์ง ๋ฒํผ ์๋ ๋ ธ์ถ
- ์ ๋์ผ์ค ์นดํ ๊ณ ๋ฆฌ ๋ฐฉ๋ฌธ ์ ๊ด๊ณ ์ฝ๋ ๊ฐ์ด๋ ํ์ด์ง ๋ฒํผ ์์ฑ
- ์ ๊ท ์นดํ ๊ณ ๋ฆฌ ์ถ๊ฐ ์ ์ค์ ๋ฐฐ์ด์๋ง ์ถ๊ฐํ๋ฉด ๋!
4. SEO ๊ด์ ์์์ ์ฅ์
- ๋ด๋ถ ๋งํฌ ๊ฐํ
์ฃผ์ ๋๋ฉ ํ์ด์ง๋ ์์ตํ ๊ด๋ จ ํ์ด์ง๋ก์ ์์ฐ์ค๋ฌ์ด ๋งํฌ ์ฐ๊ฒฐ์ด ๊ฐ๋ฅํด, ๊ตฌ๊ธ ๋ด์ด ์ฌ์ดํธ ๊ตฌ์กฐ๋ฅผ ์ฝ๊ฒ ์ดํดํฉ๋๋ค. - ์ฌ์ฉ์ ๊ฒฝํ(UX) ๊ฐ์
๋ฐฉ๋ฌธ์๊ฐ ์ํ๋ ์ ๋ณด๋ฅผ ๋น ๋ฅด๊ฒ ์ฐพ๊ณ ํด๋ฆญํ ์ ์์ด ์ดํ๋ฅ ๊ฐ์์ ๋์ ๋ฉ๋๋ค. - ์ค๋ณต ์ฝํ
์ธ ์๋ฐฉ
๋์ผํ๊ฑฐ๋ ์ ์ฌํ ์ ๋ณด๋ฅผ ํํ์ด์ง์์ ๋ณผ์ ์์ด ์ค๋ณต ๋ฌธ์ ๋ฅผ ์ค์ผ์ ์์ต๋๋ค.
5. ๊ฐ๋จํ ์ ์ฉ๋ฒ
- ๋ธ๋ก๊ทธ ์คํจ ํธ์ง → ์ํ๋ ์์น์
<div id="menu1"></div>,<div id="menu2"></div>๋ฑ ์์ฑ - ์ ์คํฌ๋ฆฝํธ๋ฅผ
<body>์ข ๋ฃ ์ง์ ์ ๋ถ์ฌ๋ฃ๊ธฐ - buttonConfigs ๋ฐฐ์ด์ ์ํ๋ ์นดํ ๊ณ ๋ฆฌ URL๊ณผ ๋ฒํผ ๋งํฌ, ํ ์คํธ๋ฅผ ์ ๋ ฅ
- ์ ์ฅ ํ ํ ์คํธ
๋ธ๋ก๊ทธ ์ด์ ์ค ์นดํ ๊ณ ๋ฆฌ๋ณ ๋ง์ถคํ ์๋ด ๋ฒํผ์ ์ฝ๊ณ ๋น ๋ฅด๊ฒ ๋ง๋ค๊ณ ์ถ๋ค๋ฉด, ์ด๋ฒ์ ์๊ฐํ ์๋ ๋ฒํผ ์์ฑ ์คํฌ๋ฆฝํธ๋ฅผ ์ถ์ฒํฉ๋๋ค. ์ด ๋ฐฉ๋ฒ์ ํนํ ์ฝํ ์ธ ๊ฐ ๋ง์์ ธ ๊ด๋ฆฌ๊ฐ ์ด๋ ค์ด ์ค·๋ํ ๋ธ๋ก๊ทธ ์ด์์์๊ฒ ์ด์ ํธ์์ฑ๊ณผ ๋ฐฉ๋ฌธ์ ๋ง์กฑ๋๋ฅผ ๋์์ ์ฌ๋ฆด ์ ์๋ ๋ฐฉ๋ฒ์ ๋๋ค.

์ด์ ๋ฒํผ ๋ชจ์
1. ๊ธฐ๋ณธ ๋ชจ๋ ๋ฒํผ
<button class="modern-btn">๊ธฐ๋ณธ ๋ฒํผ</button>
<style>
.modern-btn {
padding: 12px 24px;
background: #4a6bff;
color: white;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.modern-btn:hover {
background: #3a5bef;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
</style>
2.๊ทธ๋ผ๋ฐ์ด์ ๋ฒํผ
<button class="gradient-btn">๊ทธ๋ผ๋ฐ์ด์
</button>
<style>
.gradient-btn {
padding: 12px 30px;
background: linear-gradient(45deg, #ff6b6b, #ffa3a3);
color: white;
border: none;
border-radius: 50px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: all 0.4s;
box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}
.gradient-btn:hover {
background: linear-gradient(45deg, #ff5252, #ff7676);
transform: translateY(-3px);
box-shadow: 0 6px 20px rgba(255,82,82,0.4);
}
</style>
3.ํ ๋๋ฆฌ๋ฒํผ
<button class="outline-btn">์์๋ผ์ธ</button>
<style>
.outline-btn {
padding: 12px 28px;
background: transparent;
color: #4a6bff;
border: 2px solid #4a6bff;
border-radius: 6px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
.outline-btn:hover {
background: #4a6bff;
color: white;
box-shadow: 0 4px 12px rgba(74,107,255,0.2);
}
</style>
4.3D๋ฒํผ
<button class="three-d-btn">3D ํจ๊ณผ</button>
<style>
.three-d-btn {
padding: 14px 32px;
background: #5cb85c;
color: white;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
position: relative;
transition: all 0.2s;
box-shadow: 0 5px 0 #449d44;
}
.three-d-btn:hover {
transform: translateY(3px);
box-shadow: 0 2px 0 #449d44;
}
.three-d-btn:active {
transform: translateY(5px);
box-shadow: none;
}
</style>
5. ํ ๊ธ ๋ฒํผ
<label class="toggle-btn">
<input type="checkbox">
<span class="slider"></span>
</label>
<style>
.toggle-btn {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.toggle-btn input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #ccc;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background: white;
transition: .4s;
border-radius: 50%;
}
input:checked + .slider {
background: #4CAF50;
}
input:checked + .slider:before {
transform: translateX(26px);
}
</style>