EasyUI Forum
May 21, 2024, 04:20:09 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Colorize drop-down arrow of menu button  (Read 3422 times)
sky-t
Full Member
***
Posts: 145


View Profile
« on: January 31, 2018, 03:40:00 AM »

Hi there,

is there a way to change the color of the drop-down arrow in menu button dynamicly?
I can change the color of the text in menu button but i also want to change the color of the arrow.


Thanks for your solution!
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: January 31, 2018, 06:39:45 AM »

Define each style of the down arrows.
Code:
<style type="text/css">
.mb1 .m-btn-downarrow{
background-image: none;
}
.mb1 .m-btn-downarrow:after{
content: '';
display: block;
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-width: 4px;
border-color: transparent;
border-top-color: teal;
top: 50%;
left: 50%;
margin-top: -2px;
margin-left: -4px;
}
.mb2 .m-btn-downarrow{
background-image: none;
}
.mb2 .m-btn-downarrow:after{
content: '';
display: block;
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-width: 4px;
border-color: transparent;
border-top-color: red;
top: 50%;
left: 50%;
margin-top: -2px;
margin-left: -4px;
}
</style>

Add the menubutton css class to change the down arrow style.
Code:
$('#b1').addClass('mb1');
$('#b1').addClass('mb2');
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!