رفتن به مطلب

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


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

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

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


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;
}

  • امتیاز 1
لینک به ارسال

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

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


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
  • امتیاز 1
لینک به ارسال
  • 2 هفته بعد...

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

لینک به ارسال

لطفا برای ارسال دیدگاه وارد شوید

شما بعد از اینکه وارد حساب کاربری خود شدید می توانید دیدگاهی ارسال کنید



ورود به حساب کاربری
×
×
  • اضافه کردن...