سلام،
برای اینکه دکمه «ساخت تصاویر با هوش مصنوعی» به صورت کامل لینکدار شود و متن آن همیشه سفید باقی بماند، میتوانید کد زیر را جایگزین کنید.
HTML:
ابتدا، تگ <div> را با تگ <a> جایگزین کنید و کلاس night-sky-button را به تگ <a> اختصاص دهید:
<!-- دکمه ساخت تصاویر با هوش مصنوعی -->
<a href="https://aisada.ir/flux" target="_blank" class="night-sky-button">ساخت تصاویر با هوش مصنوعی</a>
CSS:
سپس، برای اینکه متن دکمه در هر حالت سفید باقی بماند، استایل زیر را اضافه کنید یا بهروزرسانی کنید:
.night-sky-button {
/* استایلهای موجود شما */
background-color: #000033;
padding: 16px 32px;
border-radius: 8px;
color: #ffffff;
font-size: 20px;
border: none;
cursor: pointer;
position: relative;
overflow: hidden;
display: inline-block;
text-align: center;
margin: 20px 10px;
box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
z-index: 2;
text-decoration: none;
}
.night-sky-button:link,
.night-sky-button:visited,
.night-sky-button:hover,
.night-sky-button:active {
color: #ffffff;
text-decoration: none;
}
نکات:
-
حذف استایل قبلی برای .night-sky-button a: در فایل CSS، اگر استایلی برای .night-sky-button a وجود دارد، آن را حذف کنید، زیرا دیگر تگ <a> داخلی نداریم و تمامی استایلها باید به .night-sky-button اعمال شوند.
-
حفظ انیمیشنها: تمامی انیمیشنها و افکتهای دکمه بدون تغییر باقی میمانند، زیرا فقط ساختار HTML را بهروزرسانی کردهایم و استایلها همچنان اعمال میشوند.
کد کامل بهروزرسانیشده:
<!DOCTYPE html>
<html lang="fa">
<head>
<meta charset="UTF-8">
<title>تغییر صدا با هوش مصنوعی</title>
<style>
html, body {
margin: 0;
padding: 0;
font-family: 'Arial', sans-serif;
background-color: #0d0d2b;
color: #fff;
overflow-x: hidden;
}
/* نوشته تغییر صدا با هوش مصنوعی */
#ai-text {
margin: 20px 0;
font-size: 2em;
color: #fff;
text-align: center;
text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
animation: textGlow 3s infinite alternate;
position: relative;
z-index: 2;
}
@keyframes textGlow {
from {
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
to {
text-shadow: 0 0 20px rgba(255, 255, 255, 1);
}
}
/* دکمه شروع تغییر صدا با تم هوش مصنوعی */
.start-button {
display: inline-block;
margin: 20px auto;
padding: 10px 30px;
font-size: 1.5em;
background: linear-gradient(90deg, #0fbcf9, #0be881);
color: #fff;
border: 2px solid #fff;
border-radius: 50px;
cursor: pointer;
animation: buttonGlow 2s infinite ease-in-out, borderAnimation 3s infinite;
transition: transform 0.3s ease, background 0.3s ease;
box-shadow: 0 0 15px rgba(15, 188, 249, 0.7);
position: relative;
z-index: 2;
text-decoration: none;
text-align: center;
}
@keyframes borderAnimation {
0%, 100% {
border-color: transparent;
}
50% {
border-color: #fff;
}
}
.start-button:hover {
transform: scale(1.1);
background: linear-gradient(90deg, #0be881, #0fbcf9);
}
@keyframes buttonGlow {
0%, 100% {
box-shadow: 0 0 10px rgba(15, 188, 249, 0.7);
}
50% {
box-shadow: 0 0 20px rgba(11, 232, 129, 1);
}
}
/* دکمههای جدید با انیمیشن */
.animated-button, .night-sky-button {
width: 300px; /* اندازه یکسان برای هر دو دکمه */
background-color: #1a1a2e;
padding: 16px 32px;
border-radius: 8px;
color: white;
font-size: 20px;
border: none;
cursor: pointer;
position: relative;
overflow: hidden;
display: inline-block;
text-align: center;
margin: 20px 10px;
text-decoration: none;
}
/* استایل مخصوص دکمه چت با هوش مصنوعی */
.animated-button {
animation: pulse 3s infinite;
color: white;
text-decoration: none;
}
.animated-button span {
position: relative;
z-index: 3;
color: white;
}
/* افکت آب در داخل دکمه */
.animated-button::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(15, 188, 249, 0.5);
z-index: 1;
animation: calmWave 8s ease-in-out, strongWave 8s ease-in-out 8s forwards, calmWave 8s ease-in-out 16s forwards infinite;
}
/* افکت نور پشت دکمه */
.animated-button::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05), transparent);
animation: wind 40s linear infinite;
z-index: 0;
}
@keyframes wind {
0% {
transform: translateX(0) translateY(0) rotate(0deg);
}
100% {
transform: translateX(100%) translateY(-100%) rotate(360deg);
}
}
/* انیمیشن موجهای آرام */
@keyframes calmWave {
0%, 100% {
clip-path: polygon(0% 70%, 10% 73%, 20% 70%, 30% 73%, 40% 70%, 50% 73%, 60% 70%, 70% 73%, 80% 70%, 90% 73%, 100% 70%, 100% 100%, 0% 100%);
}
50% {
clip-path: polygon(0% 72%, 10% 75%, 20% 72%, 30% 75%, 40% 72%, 50% 75%, 60% 72%, 70% 75%, 80% 72%, 90% 75%, 100% 72%, 100% 100%, 0% 100%);
}
}
/* انیمیشن موجهای شدید */
@keyframes strongWave {
0% {
clip-path: polygon(0% 70%, 10% 73%, 20% 70%, 30% 73%, 40% 70%, 50% 73%, 60% 70%, 70% 73%, 80% 70%, 90% 73%, 100% 70%, 100% 100%, 0% 100%);
}
25% {
clip-path: polygon(0% 60%, 10% 65%, 20% 60%, 30% 65%, 40% 60%, 50% 65%, 60% 60%, 70% 65%, 80% 60%, 90% 65%, 100% 60%, 100% 100%, 0% 100%);
}
50% {
clip-path: polygon(0% 50%, 10% 55%, 20% 50%, 30% 55%, 40% 50%, 50% 55%, 60% 50%, 70% 55%, 80% 50%, 90% 55%, 100% 50%, 100% 100%, 0% 100%);
}
75% {
clip-path: polygon(0% 60%, 10% 65%, 20% 60%, 30% 65%, 40% 60%, 50% 65%, 60% 60%, 70% 65%, 80% 60%, 90% 65%, 100% 60%, 100% 100%, 0% 100%);
}
100% {
clip-path: polygon(0% 70%, 10% 73%, 20% 70%, 30% 73%, 40% 70%, 50% 73%, 60% 70%, 70% 73%, 80% 70%, 90% 73%, 100% 70%, 100% 100%, 0% 100%);
}
}
.animated-button:hover {
background-color: #0fbcf9;
transform: scale(1.05);
box-shadow: 0 0 20px rgba(15, 188, 249, 0.5);
color: white;
}
/* کشتی و مرد */
.ship {
position: absolute;
bottom: 25%;
left: -20%;
width: 30px;
height: 30px;
z-index: 2;
animation: shipMove 16s linear infinite;
}
.boat {
position: absolute;
bottom: 0;
left: 5px;
width: 20px;
height: 10px;
background: sienna;
border-radius: 0 0 5px 5px;
}
.sail {
position: absolute;
bottom: 10px;
left: 7px;
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 12px solid white;
}
.man {
position: absolute;
bottom: 10px;
left: 12px;
width: 5px;
height: 10px;
background: black;
}
.paddle {
position: absolute;
bottom: 5px;
left: 15px;
width: 15px;
height: 2px;
background: brown;
transform-origin: left center;
animation: paddleMove 1s linear infinite;
}
@keyframes paddleMove {
0% {
transform: rotate(0deg);
}
50% {
transform: rotate(45deg);
}
100% {
transform: rotate(0deg);
}
}
@keyframes shipMove {
0% {
left: -20%;
}
100% {
left: 100%;
}
}
/* افکت محو شدن متن */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* دکمه آسمان پرستاره با سیارات متعدد */
.night-sky-button {
background-color: #000033;
padding: 16px 32px;
border-radius: 8px;
color: #ffffff;
font-size: 20px;
border: none;
cursor: pointer;
position: relative;
overflow: hidden;
display: inline-block;
text-align: center;
margin: 20px 10px;
box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
z-index: 2;
text-decoration: none;
}
/* حذف این بخش اگر وجود دارد */
/* .night-sky-button a {
color: #ffffff;
text-decoration: none;
position: relative;
z-index: 2;
} */
/* ایجاد پسزمینه آسمان پرستاره با سیارات متعدد */
.night-sky-button::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: transparent url('data:image/svg+xml,...') repeat; /* کد SVG شما */
background-size: 200px 200px;
animation: twinkling 50s linear infinite;
z-index: 1;
}
/* انیمیشن حرکت ستارهها */
@keyframes twinkling {
from {
transform: translate3d(0, 0, 0);
}
to {
transform: translate3d(-200px, 0, 0);
}
}
.night-sky-button:hover {
background-color: #000044;
transform: scale(1.05);
box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}
.night-sky-button:link,
.night-sky-button:visited,
.night-sky-button:hover,
.night-sky-button:active {
color: #ffffff;
text-decoration: none;
}
/* مدیا کوئری برای حالت موبایل */
@media (max-width: 768px) {
.start-button, .animated-button, .night-sky-button {
width: 80%;
font-size: 1em;
}
}
</style>
</head>
<body>
<!-- متن تغییر صدا با هوش مصنوعی -->
<div id="ai-text">تغییر صدا با هوش مصنوعی</div>
<!-- دکمه شروع تغییر صدا -->
<div style="text-align: center;">
<a class="start-button" href="https://apperio.ir/mobile/0V9S-0FG0-7Q3H-GKD4#/nav/page-builder203" style="color: #ffffff;">
<span style="font-size: 16pt;">شروع تغییر صدا</span> (<span style="font-size: 12pt;">رایگان</span>)
</a>
</div>
<!-- دکمههای جدید -->
<div style="text-align: center;">
<!-- دکمه چت با هوش مصنوعی -->
<a href="https://aisada.ir/chat" class="animated-button">
<span>چت با هوش مصنوعی</span>
<div class="ship">
<div class="boat"></div>
<div class="sail"></div>
<div class="man"></div>
<div class="paddle"></div>
</div>
</a>
<!-- دکمه ساخت تصاویر با هوش مصنوعی -->
<a href="https://aisada.ir/flux" target="_blank" class="night-sky-button">ساخت تصاویر با هوش مصنوعی</a>
</div>
</body>
</html>
با انجام این تغییرات:
- کل دکمه «ساخت تصاویر با هوش مصنوعی» لینکدار شده و کاربران میتوانند با کلیک بر روی هر قسمت از دکمه به صفحه مورد نظر هدایت شوند.
- متن دکمه در هر حالت سفید باقی میماند.
- انیمیشنها و افکتهای دکمه بدون تغییر باقی میمانند.
امیدوارم این راهحل برای شما مفید باشد. اگر سوال دیگری دارید، خوشحال میشوم کمک کنم.