EasyUI Forum
May 08, 2024, 07:16:15 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: The best way to increase the icon size of easyui icon  (Read 3344 times)
Alfred
Full Member
***
Posts: 134


-Licensed User-


View Profile
« on: February 11, 2020, 11:37:02 AM »

How do I increase the size the default icons which are 16×16 to something like 20×20?  For example, if I increase the user icon png image to 20×20, the full image will not appear when I use it on iconCls="" such as below.  How do I increase the button size to meet the size of the icon? Is there any CSS hack to achieve it?

Code:
<a href="#" iconCls="icon-user" class="easyui-linkbutton"></a>

Thanks,
Alfred
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: February 11, 2020, 08:19:50 PM »

Define these css styles to support the middle icon size.
Code:
<style type="text/css">
.l-btn-middle .l-btn-text {
  line-height: 36px;
}
.l-btn-middle .l-btn-icon {
  width: 24px;
  height: 24px;
  line-height: 24px;
  margin-top: -12px;
}
.l-btn-middle .l-btn-icon-left .l-btn-text {
  margin-left: 36px;
}
</style>

And then assign the 'size' to 'middle' for the linkbutton components.
Code:
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-pic',size:'middle'">Add</a>
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!