رفتن به مطلب

رویداد فعال بودن یک لینک در منو سایت


پست های پیشنهاد شده

رویداد فعال بودن یک لینک چیه؟ که وقتی داخل اون صفحه هست اون لینک رنگش با بقیه متمایز باشه؟

میشه در این کد به من بگید؟


nav {
margin:0 auto;
text-align: center;
}
nav ul ul {
display: none;
height:30px;
line-height:30px;
}
nav ul li:hover > ul {
display: block;
}
nav ul {
list-style: none;
position: relative;
display: inline-table;
height:70px;
line-height:70px;
}
nav ul:after {
}
nav ul li {
float: right;
background: transparent url(images/Menu-Image.png);
background-color:#89D2FD;
-webkit-transition: background 0.2s linear;
-moz-transition: background 0.2s linear;
-ms-transition: background 0.2s linear;
-o-transition: background 0.2s linear;
transition: background 0.2s linear;

}
nav ul li:hover {
background:#248FCA;
border-left:0.1em solid #B8E4FE;
width:188px;
}
nav ul li:hover a {
color: #fff;
}

nav ul li a {
display: block;
text-decoration: none;
font-size: 16px;
text-align:center;
color: #fff;
width:189px;

}


nav ul ul {
width:188px;
position: absolute;
border-top: 1px solid #BFE7FE;

}
nav ul ul li{
float: none;
background:#248FCA;
position: relative;
z-index: 999;
}
nav ul ul li a {
font-size: 14px;
color: #fff;
-webkit-transition: background 0.2s linear;
-moz-transition: background 0.2s linear;
-ms-transition: background 0.2s linear;
-o-transition: background 0.2s linear;
transition: background 0.2s linear;
}
nav ul ul li a:hover
{
background: #78CCFD;
width:188px;
}

nav ul ul ul {
position: absolute; left: 100%; top:0;
}

لینک به ارسال

رویداد فعال بودن یک لینک چیه؟ که وقتی داخل اون صفحه هست اون لینک رنگش با بقیه متمایز باشه؟

میشه در این کد به من بگید؟


nav {
margin:0 auto;
text-align: center;
}
nav ul ul {
display: none;
height:30px;
line-height:30px;
}
nav ul li:hover > ul {
display: block;
}
nav ul {
list-style: none;
position: relative;
display: inline-table;
height:70px;
line-height:70px;
}
nav ul:after {
}
nav ul li {
float: right;
background: transparent url(images/Menu-Image.png);
background-color:#89D2FD;
-webkit-transition: background 0.2s linear;
-moz-transition: background 0.2s linear;
-ms-transition: background 0.2s linear;
-o-transition: background 0.2s linear;
transition: background 0.2s linear;

}
nav ul li:hover {
background:#248FCA;
border-left:0.1em solid #B8E4FE;
width:188px;
}
nav ul li:hover a {
color: #fff;
}

nav ul li a {
display: block;
text-decoration: none;
font-size: 16px;
text-align:center;
color: #fff;
width:189px;

}


nav ul ul {
width:188px;
position: absolute;
border-top: 1px solid #BFE7FE;

}
nav ul ul li{
float: none;
background:#248FCA;
position: relative;
z-index: 999;
}
nav ul ul li a {
font-size: 14px;
color: #fff;
-webkit-transition: background 0.2s linear;
-moz-transition: background 0.2s linear;
-ms-transition: background 0.2s linear;
-o-transition: background 0.2s linear;
transition: background 0.2s linear;
}
nav ul ul li a:hover
{
background: #78CCFD;
width:188px;
}

nav ul ul ul {
position: absolute; left: 100%; top:0;
}

سلام تست کنید


.current-cat , .current_page_item , .current-cat-parent{
background:red;
}
ul.children li.current-cat {
background:green !important;
}

ویرایش شده توسط hamid_khaleghi
لینک به ارسال
  • 2 هفته بعد...

ممنون حالا اگر ساب منو بخوام رنگش تغییر کنه وقتی روش کلیک میشه و داخل صفحه خود ش بره به چه صورت هست ؟

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...