亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

VUE登錄注冊頁面完整代碼(直接復制)

 更新時間:2023年12月25日 08:27:42   作者:good_good_study5  
這篇文章主要給大家介紹了關于VUE登錄注冊頁面的相關資料,在Vue中可以使用組件來構建登錄注冊頁面,文中通過圖文以及代碼介紹的非常詳細,需要的朋友可以參考下

效果圖:

Login.vue

<template>
    <div class="container">
            <div class="login-wrapper">
                <div class="header">Login</div>
                <div class="form-wrapper">
                    <input type="text" name="username" placeholder="username" class="input-item">
                    <input type="password" name="password" placeholder="password" class="input-item">
                    <div class="btn">Login</div>
                </div>
            </div>
        </div>
</template>

<script>
    export default {
        name:"Login"
    }
</script>

<style scoped>

html {
    height: 100%;
}
body {
    height: 100%;
}
.container {
    /* margin-top: 5%; */
    height: 980px;
    width: 100%;
    background-image: linear-gradient(to right, #fbc2eb, #a6c1ee);
}
.login-wrapper {
    background-color: #fff;
    width: 358px;
    height: 588px;
    border-radius: 15px;
    padding: 0 50px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.header {
    font-size: 38px;
    font-weight: bold;
    text-align: center;
    line-height: 200px;
}
.input-item {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    border: 0;
    padding: 10px;
    border-bottom: 1px solid rgb(128, 125, 125);
    font-size: 15px;
    outline: none;
}
.input-item:placeholder {
    text-transform: uppercase;
}
.btn {
    text-align: center;
    padding: 10px;
    margin: 0 auto;
    width: 100%;
    margin-top: 40px;
    background-image: linear-gradient(to right, #a6c1ee, #fbc2eb);
    color: #fff;
}
.msg {
    text-align: center;
    line-height: 88px;
}
a {
    text-decoration-line: none;
    color: #abc1ee;
}

</style>

Register.vue

<template>
    <div class="container">
            <div class="login-wrapper">
                <div class="header">Register</div>
                <div class="form-wrapper">
                    <input type="text" name="username" placeholder="賬戶" class="input-item">
                    <input type="password" name="password" placeholder="密碼" class="input-item">
                    <input type="password" name="repassword" placeholder="再次確認密碼" class="input-item">
                    <div class="btn">Register</div>
                </div>
            </div>
        </div>
</template>
    
<script>
    export default {
        name:"Reg"
    }
</script>

<style scoped>
html {
    height: 100%;
}
body {
    height: 100%;
}
.container {
    /* margin-top: 5%; */
    height: 980px;
    width: 100%;
    background-image: linear-gradient(to right, #fbc2eb, #a6c1ee);
}
.login-wrapper {
    background-color: #fff;
    width: 358px;
    height: 588px;
    border-radius: 15px;
    padding: 0 50px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.header {
    font-size: 38px;
    font-weight: bold;
    text-align: center;
    line-height: 200px;
}
.input-item {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    border: 0;
    padding: 10px;
    border-bottom: 1px solid rgb(128, 125, 125);
    font-size: 15px;
    outline: none;
}
.input-item:placeholder {
    text-transform: uppercase;
}
.btn {
    text-align: center;
    padding: 10px;
    width: 100%;
    margin-top: 40px;
    background-image: linear-gradient(to right, #a6c1ee, #fbc2eb);
    color: #fff;
    margin: 0 auto;
}
.msg {
    text-align: center;
    line-height: 88px;
}
a {
    text-decoration-line: none;
    color: #abc1ee;
}

</style>

由于顯示的分辨率和比例不同,最終展示可能出現位置不對等問題,主要調節(jié)<style>中.container的height屬性和.login-wrapper的transform:屬性

App.vue也奉上:

<template>
  <div id="app">
      <div class="title">
          <div class="btn" @click="msg='Login'">登錄</div>
          <div class="btn" @click="msg='Reg'">注冊</div>
      </div>
      <component :is="msg"></component>
  </div>
</template>

<script>
//這里的from路徑根據自己的布局更改路徑
import Login from './components/login.vue'
import Reg from './components/register.vue'
export default {
  name: 'App',
  data(){
      return{
          msg:"Login"
      }
  },
  components: {
    Login,
    Reg
  }
}
</script>

<style>
.title{
    text-align: center;
    background-image: linear-gradient(to right, #fbc2eb, #a6c1ee);
}
.btn {   
    background-color: rgb(210,193,326);
    border-radius:28px;
    border:1px solid #ffffff;
    display:inline-block;
    cursor:pointer;
    color:#ffffff;
    font-family:Arial;
    font-size:17px;
    padding:16px 31px;
    text-decoration:none;
    text-shadow:0px 1px 0px #2f6627; 
    margin: 10px 20px;  
}
.btn:hover {
    background-color:rgb(180,193,237);
}
.btn:active {
    position:relative;
    top:1px;
}
</style>

總結 

到此這篇關于VUE登錄注冊頁面的文章就介紹到這了,更多相關VUE登錄注冊頁面內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

  • vue input 輸入校驗字母數字組合且長度小于30的實現代碼

    vue input 輸入校驗字母數字組合且長度小于30的實現代碼

    這篇文章主要介紹了vue input 校驗字母數字組合且長度小于30的實現代碼,文章給大家補充介紹了在Vue.Js下使用el-input框只能輸入數字并限制位數并且限制中文輸入以及粘貼功能,感興趣的朋友跟隨腳本之家小編一起看看吧
    2018-05-05
  • vue2 全局變量的設置方法

    vue2 全局變量的設置方法

    下面小編就為大家分享一篇vue2 全局變量的設置方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2018-03-03
  • vue3響應式原理之Ref用法及說明

    vue3響應式原理之Ref用法及說明

    這篇文章主要介紹了vue3響應式原理之Ref用法及說明,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-12-12
  • Vue中使用vue-count-to(數字滾動插件)詳細教程

    Vue中使用vue-count-to(數字滾動插件)詳細教程

    這篇文章主要給大家介紹了關于Vue中使用vue-count-to(數字滾動插件)的相關資料,最近需要開發(fā)一個數字滾動效果,在網上找到一個關于vue-countTo的插件,覺得這個插件還不錯,需要的朋友可以參考下
    2023-09-09
  • Vue ElementUI中Upload組件批量上傳的實現代碼

    Vue ElementUI中Upload組件批量上傳的實現代碼

    ElementUI中Upload組件批量上傳通過獲取upload組件的DOM、文件、上傳地址和數據,封裝uploadFiles方法,使用ajax方式上傳多個文件,后臺接口接收多文件并返回上傳結果,本文介紹Vue ElementUI中Upload組件如何批量上傳,感興趣的朋友一起看看吧
    2025-02-02
  • vite+vue3項目集成ESLint與prettier的過程詳解

    vite+vue3項目集成ESLint與prettier的過程詳解

    這篇文章主要介紹了vite+vue3項目中集成ESLint與prettier的相關知識,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2023-09-09
  • Vite打包項目后圖片丟失的簡單解決方法

    Vite打包項目后圖片丟失的簡單解決方法

    vue項目完成打包上線的時候很多人都會碰到靜態(tài)資源找不到的情況,下面這篇文章主要給大家介紹了關于Vite打包項目后圖片丟失的簡單解決方法,需要的朋友可以參考下
    2023-05-05
  • vue中使用vee-validator完成表單校驗方案

    vue中使用vee-validator完成表單校驗方案

    vee-validator是一種基于vue模板的輕量級校驗框架。本文主要討論的是vee-validator校驗方案,感興趣的朋友跟隨小編一起看看吧
    2019-11-11
  • vue實現純前端表格滾動分頁加載

    vue實現純前端表格滾動分頁加載

    這篇文章主要為大家詳細介紹了vue實現純前端表格滾動分頁加載,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-04-04
  • vue實現移動端table表格簡單方法

    vue實現移動端table表格簡單方法

    這篇文章主要給大家介紹了關于vue實現移動端table表格簡單方法的相關資料,使用Vue.js開發(fā)移動應用程序時,經常需要使用各種UI組件,其中el-table是一個常用的表格組件,可以方便地展示數據,需要的朋友可以參考下
    2023-09-09

最新評論