项目开发日志(登录界面):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通行证

相关推荐
用户0595401744612 小时前
把Agent记忆测试从Mock换到真实Redis,漏测率从30%降到0
前端·css
Surprisec12 小时前
如何用 TypeScript 写一个最小可运行的 CLI Agent
前端·人工智能·typescript
marskim12 小时前
零依赖、高性能!从零实现 React 拖拽排序组件(基于 HTML5 Drag and Drop API)
前端
jingling55512 小时前
从零到一:用 Aholo Viewer 在浏览器里渲染 3D 高斯泼溅小熊
linux·前端·ubuntu·3d
Good kid.12 小时前
开源一套 Vue3 多模态 AI 控制台前端:游乐场、工作室与 API 文档页
前端·人工智能·开源
小林ixn12 小时前
前后端模块化分离实战:从零搭建用户列表展示(HTML+CSS+JS + json-server)
前端·javascript
天才熊猫君12 小时前
我把一个 bug 发给 ai,ai 直接通过 playwright mcp 直接排查出 bug。。
前端·javascript
布兰妮甜13 小时前
Vue 视图不更新?常见赋值踩坑点汇总
前端·javascript·vue.js·vue踩坑·vue视图不更新
前端 贾公子13 小时前
uni-app工程化实战:基于vue-i18n和i18n-ally的国际化方案 (下)
前端
@zulnger13 小时前
selenium 操作浏览器
前端·javascript·selenium