web开发 PC管理端常用样式汇总 - 个人笔记

效果一,表单分段标题样式效果

效果:
在这里插入图片描述

代码:

          <div style="display: block;width:100%;">
            <div class="section-title">
              基本信息
            </div>
          </div>
.section-title{
  border-left: 4px solid #2483ff;
  color: #2483ff;
  padding: 0 10px;
  display: inline-block;
  margin-bottom:15px;
  background:linear-gradient(90deg,rgba(36,131,255,.1) 18.82%,rgba(36,131,255,.0001));
}

二、自定义按钮样式1

效果:
在这里插入图片描述
代码:

.button-style{
  border:1px solid black;
  width:100px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: #06f;
  border-radius: 3px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 14px;
  border-color: #06f;
  margin:30px 30px 0 0;
}
.button-style:hover{
  background-color:rgb(240,246,255);
}
			<div
        	 class="button-style"
              @click="buttonHandle('watch')"
            >修改密码</div>

三、查询栏折叠效果

效果图:

展开后:
在这里插入图片描述
折叠后:
在这里插入图片描述

放置按钮:

 <div class="page-container">
    <div class="flex-div">
      <el-button type="primary" :icon="flexIcon" class="flex-button" :title="flexTitle" @click="queryChange" />
    </div>
    <el-header :height="showQuery?'75px':'0'" class="query-header">  // 我的页面中查询栏是2行,高度为75px,请根据实际调整

      <el-collapse-transition>
        <div v-show="showQuery">
        xxxx 查询栏的控件

定义数据

      showQuery: true,
      flexTitle: '点击收起查询栏',
      flexIcon: 'el-icon-arrow-up',

按钮点击折叠事件:

  methods: {
    // 收缩、展示查询栏
    queryChange: function() {
      this.showQuery = !this.showQuery
      this.flexTitle = this.showQuery ? '点击收起查询栏' : '点击展开查询栏'
      this.flexIcon = this.showQuery ? 'el-icon-arrow-up' : 'el-icon-arrow-down'
    },

样式:

.flex-div {
  width: 36px;
  height: 36px;
  text-align: center;
  line-height: 36px;
  position: absolute;
  right: 10px;
  z-index: 1000;
  transition: 0.5s;
  position: absolute;
  top:0;
}
.flex-button {
  padding: 0;
  width: 36px;
  height: 36px;
  transition: 0.5s;
}
.flex-div:hover {
  background-color: rgba(167, 210, 255, 0.267);
  border-radius: 6px;
}
.query-header {
  transition: 0.5s;
}
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值