项目开发日志(登录界面):2. LoginTitle组件

LoginTitle组件

样式

说明

属性

属性名 含义 类型 是否必填 默认值
welcomeTitle 欢迎标语 String
mainTitle 标题 String

样式

@mainColor -> 主题颜色

代码

javascript 复制代码
<template>
    <div class="logintitle-container">
        <p class="subtitle">{{ welcomeTitle }}</p>
        <h1>
            <span>{{ mainTitle }}</span>
        </h1>
        <p class="icon-box">
            <i></i>
            <i></i>
        </p>
    </div>
</template>

<script>

export default {
    props:{
        welcomeTitle:{
            type:String,
            require:true,
        },
        mainTitle:{
            type:String,
            require:true,
        },
    },
}
</script>

<style lang="less" scoped>
@import url("~@/styles/init.less");
    .logintitle-container{
        width: 100%;
        flex-direction: column;
        text-align: left;
        position: relative;
    }
    .subtitle {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    h1 {
        position: relative;
        display: inline-block;
    }

    h1 span {
        z-index: 1;
        position: relative;

    }

    h1::after {
        width: 59%;
        height: 0.7rem;
        position: absolute;
        content: "";
        z-index: 0;
        right: -1.5rem;
        top: 2rem;
        transition: all 0.3s;
        background-color: @mainColor;
    }

    .icon-box {
        width: 100%;
        display: flex;
        justify-content: end;

        i:nth-child(1) {
            margin-right: 0.45rem;
        }

        i:nth-child(2) {
            margin-right: 0.7rem;
        }

        i:nth-child(1)::before {
            display: flex;
            content: "";
            width: 0.813rem;
            height: 1rem;
            transform-origin: left top;
            transform: skew(35deg);
            transition: all 0.3s;
            background-color: @mainColor;
        }

        i:nth-child(1)::after {
            display: flex;
            content: "";
            width: 0.813rem;
            height: 1rem;
            transform-origin: left bottom;
            transform: skew(-35deg);
            transition: all 0.3s;
            background-color: @mainColor;
        }

        i:nth-child(2)::before {
            display: flex;
            content: "";
            width: 0.813rem;
            height: 1rem;
            background-color: #efefef;
            transform-origin: left top;
            transform: skew(35deg);
            transition: all 0.3s;
        }

        i:nth-child(2)::after {
            display: flex;
            content: "";
            width: 0.813rem;
            height: 1rem;
            background-color: #efefef;
            transform-origin: left bottom;
            transform: skew(-35deg);
            transition: all 0.3s;
        }
    }
</style>

页面参考:yostar通行证

相关推荐
一只小阿乐5 小时前
react 封装弹框组件 传递数据
前端·javascript·react.js
533_5 小时前
[element-plus] el-tree 动态增加节点,删除节点
前端·javascript·vue.js
禁止摆烂_才浅5 小时前
前端开发小技巧-【JavaScript】- 获取元素距离 document 顶部的距离
前端·javascript·react.js
wshzd5 小时前
LLM之Agent(二十九)|LangChain 1.0核心组件介绍
前端·javascript·langchain
程序猿_极客5 小时前
Vue 2脚手架从入门到实战核心知识点全解析(day6):从工程结构到高级通信(附代码讲解)
前端·javascript·vue.js·vue2学习笔记
q***71855 小时前
海康威视摄像头ISUP(原EHOME协议) 摄像头实时预览springboot 版本java实现,并可以在浏览器vue前端播放(附带源码)
java·前端·spring boot
web加加5 小时前
vue3 +vite项目页面防f12,防打开控制台
前端·javascript·vue.js
A尘埃6 小时前
大模型应用python+Java后端+Vue前端的整合
java·前端·python
遥遥晚风点点7 小时前
Spark导出数据文件到HDFS
前端·javascript·ajax
克里斯蒂亚L7 小时前
开发一个计时器组件
前端·浏览器