当前位置: 首页 > 工具软件 > NUI > 使用案例 >

普元nui:按钮特效

别俊誉
2023-12-01

 jsp

<!-- 引入导航栏css特效 -->
<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/syfh_zcd/css/datouwang.com.css">
<table style="width: 777px;">
					<tr>
						<!-- <td style="width: 100%;">
							<a id="update" class="nui-button" iconCls="icon-edit" onclick="edit()"> 编辑 </a>
							<a class="nui-button" iconCls="icon-add" onclick="add()"> 增加 </a>
							<a class="nui-button" iconCls="icon-remove" onclick="remove()"> 删除 </a>
						</td> -->
						<nav class="nav">
						<td>
							<a href="javascript:onSchedule('all')" class="nav-item" active-color="green">查看所有</a> <a href="javascript:onSchedule('approve')" class="nav-item" active-color="blue">审批中</a>
							<a href="javascript:onSchedule('agree')" class="nav-item" active-color="red">同意放款</a> <a href="javascript:onSchedule('refuse')" class="nav-item"
								active-color="rebeccapurple">拒绝放款</a>
							<span class="nav-indicator"></span>
						</td>
						</nav>
					</tr>
				</table>

css

/* DaTouWang URL: www.datouwang.com */
* {
  box-sizing: border-box;
}

body {
  text-align: center;
  display: flex;
  height: 100vh;
  justify-content: center;
  align-items: center;
}

.nav {
  display: inline-flex;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  background-color: #fff;
  padding: 0 20px;
  border-radius: 40px;
}

.nav-item {
  color: #2266CA;
  text-decoration: none;
  transition: .3s;
  margin: 0 6px;
  z-index: 1;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  position: relative;
}
.nav-item:before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: #BEB3F1;
  border-radius: 8px 8px 0 0;
  opacity: 0;
  transition: .3s;
}

.nav-item:not(.is-active):hover:before {
  opacity: 1;
  bottom: 0;
}

.nav-item:not(.is-active):hover {
  color: #FFA07A;
}

.nav-indicator {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  transition: .4s;
  height: 5px;
  z-index: 1;
  border-radius: 8px 8px 0 0;
}

@media (max-width: 580px) {
  .nav {
    overflow: auto;
  }
}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 类似资料: