最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

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

效果圖:

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="再次確認(rèn)密碼" 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>

由于顯示的分辨率和比例不同,最終展示可能出現(xiàn)位置不對等問題,主要調(diào)節(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路徑根據(jù)自己的布局更改路徑
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>

總結(jié) 

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

相關(guān)文章

  • vxe-table?實(shí)現(xiàn)表格數(shù)據(jù)分組功能(按指定字段數(shù)據(jù)分組)

    vxe-table?實(shí)現(xiàn)表格數(shù)據(jù)分組功能(按指定字段數(shù)據(jù)分組)

    文章介紹了如何使用樹結(jié)構(gòu)實(shí)現(xiàn)表格數(shù)據(jù)分組,并提供了官方文檔的鏈接,本文結(jié)合實(shí)例代碼給大家介紹的非常詳細(xì),感興趣的朋友跟隨小編一起看看吧
    2024-11-11
  • 一文帶你深入理解Vue3響應(yīng)式原理

    一文帶你深入理解Vue3響應(yīng)式原理

    響應(yīng)式就是當(dāng)對象本身(對象的增刪值)或者對象屬性(重新賦值)發(fā)生變化時(shí),將會運(yùn)行一些函數(shù),最常見的就是render函數(shù),下面這篇文章主要給大家介紹了關(guān)于Vue3響應(yīng)式原理的相關(guān)資料,需要的朋友可以參考下
    2022-11-11
  • elementUI select組件默認(rèn)選中效果實(shí)現(xiàn)的方法

    elementUI select組件默認(rèn)選中效果實(shí)現(xiàn)的方法

    這篇文章主要介紹了elementUI select組件默認(rèn)選中效果實(shí)現(xiàn)的方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-03-03
  • 詳解vue 自定義組件使用v-model 及探究其中原理

    詳解vue 自定義組件使用v-model 及探究其中原理

    這篇文章主要介紹了詳解vue 自定義組件使用v-model 及探究其中原理,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-10-10
  • 解決antd Form 表單校驗(yàn)方法無響應(yīng)的問題

    解決antd Form 表單校驗(yàn)方法無響應(yīng)的問題

    這篇文章主要介紹了解決antd Form 表單校驗(yàn)方法無響應(yīng)的問題,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2020-10-10
  • 解決vue單頁面應(yīng)用中動態(tài)修改title問題

    解決vue單頁面應(yīng)用中動態(tài)修改title問題

    這篇文章主要介紹了解決vue單頁面應(yīng)用中動態(tài)修改title問題,本文通過示例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2019-06-06
  • 一文徹底教會你在vue中寫jsx

    一文徹底教會你在vue中寫jsx

    以前我們經(jīng)常在react中使用jsx,現(xiàn)在我們在vue中也是用jsx,下面這篇文章主要給大家介紹了關(guān)于在vue中寫jsx的相關(guān)資料,文中通過實(shí)例代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2023-06-06
  • vue3+vite+JS使用Echarts封裝一個(gè)餅圖完整代碼(父子組件聯(lián)動)

    vue3+vite+JS使用Echarts封裝一個(gè)餅圖完整代碼(父子組件聯(lián)動)

    在Vue中繪制餅圖有多種方式,其中最常用的是使用第三方圖表庫,如ECharts、Chart.js等,下面這篇文章主要介紹了vue3+vite+JS使用Echarts封裝一個(gè)餅圖(父子組件聯(lián)動)的相關(guān)資料,需要的朋友可以參考下
    2026-03-03
  • vue實(shí)現(xiàn)自定義日期組件功能的實(shí)例代碼

    vue實(shí)現(xiàn)自定義日期組件功能的實(shí)例代碼

    這篇文章主要介紹了vue自定義日期組件的實(shí)現(xiàn)代碼,代碼簡單易懂,非常不錯,具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2018-11-11
  • 簡單聊聊Vue中的計(jì)算屬性和屬性偵聽

    簡單聊聊Vue中的計(jì)算屬性和屬性偵聽

    計(jì)算屬性用于處理復(fù)雜的業(yè)務(wù)邏輯,vue提供了檢測數(shù)據(jù)變化的一個(gè)屬性watch可以通過newVal獲取變化之后的值,這篇文章主要給大家介紹了關(guān)于Vue中計(jì)算屬性和屬性偵聽的相關(guān)資料,需要的朋友可以參考下
    2021-10-10

最新評論

海口市| 玉林市| 乐山市| 元谋县| 东光县| 梧州市| 惠水县| 鄢陵县| 靖安县| 平湖市| 威海市| 赣州市| 多伦县| 天门市| 木兰县| 遂宁市| 周至县| 泰顺县| 都江堰市| 永寿县| 和硕县| 浦县| 钟祥市| 股票| 莒南县| 卫辉市| 吴川市| 嵊州市| 长春市| 房山区| 尼玛县| 太康县| 长汀县| 天津市| 开阳县| 财经| 舒城县| 平塘县| 南通市| 仙桃市| 哈巴河县|