Tailwind CSS 制作抖音 PC 端登录框
2023-02-10 本文已影响0人
dowebok
抖音 PC 端登录框
这是使用 Tailwind CSS 制作的抖音 PC 端登录框 HTML 代码(包括简单的 Javascript),从上图可以看到,登录框内包了扫描登录、验证码登录和密码登录三种方式,验证码登录和密码登录方式国际区号可下拉选择。由于使用 Tailwind CSS 制作,所以不兼容 IE 低版本浏览器,需要使用 Chrome、Firefox 或者 Microsoft Edge 等现代浏览器才能正常显示。
查看效果:https://www.dowebok.com/demo/10401/
制作方法
1、引入文件
<link rel="stylesheet" href="css/tailwind.min.css">
<script src="js/jquery.min.js"></script>
2、HTML 代码
<div class="dowebok relative text-sm">
<h4 class="text-2xl text-center">登录后即可查看关注的人的视频</h4>
<ul class="flex justify-around mt-1 mb-3">
<li class="dwo-icon dwo-icon-1 flex items-center">高清视频免费看</li>
<li class="dwo-icon dwo-icon-2 flex items-center">点赞评论随心发</li>
<li class="dwo-icon dwo-icon-3 flex items-center">直播间畅聊打赏</li>
</ul>
<!-- 登录主体 -->
<div class="login h-92.5 rounded-lg bg-white">
<div>
<ul class="dwo-nav flex justify-around h-14 px-7 border-b border-solid border-gray-200 text-lg">
<li class="px-2 text-gray-600 cursor-pointer border-b-3 border-solid border-red-500 hover:text-gray-900">扫码登录</li>
<li class="px-2 text-gray-600 cursor-pointer hover:text-gray-900">验证码登录</li>
<li class="px-2 text-gray-600 cursor-pointer hover:text-gray-900">密码登录</li>
</ul>
</div>
<!-- 二维码登录 -->
<div class="dwo-panel">
<div class="w-44 h-44 mt-10 mx-auto border border-solid border-gray-200 rounded-md overflow-hidden">
<img src="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIAAQMAAADOtka5AAAABlBMVEX///8AAABVwtN+AAAGbUlEQVR42uydPZKtOAyFRREQsgSW4qXZS2MpLIGQgEJTOpIM3O6e6FXhS8nB1PAufEkLWT9HhmLFihUrVqxYDa6esWbK1B39Nqw0MRdion4beCVKhbjbe96IJrnt6PSJJQCvAuz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yVT0o45TX1LoOhDFvyjvA/A0oN8l/JIoTQMzJFqZMUEBKQGSLp9ZFQuxibcANAVASC0OmzRNWqclaXfYmo8avw2IvCmXjj/7jQF4B8AKXmwZsm3v4uNHyEh06hxefZYoDZLrD4lmAB4GnP3Go/POgzxTB2F8ngkKL5Vcf7r1AHw/QNMsHWUz+YAOStDlKIK9VrYlAdvvtbQAPA+guosj2NYht3oWyKhiefvBBhf32/YegFcA+qrYlHxqkIvJphj1LszY7CojEfThTZEANAS4jriY+NL7zjbxBum9qYESsuqb5DoATQDkJ42vO/hrBNts7znE8tnsAMNN0Gh+6A8C8A6Apla127FIlEYesqk0yIrZqbiSbKEAtASg6ryhsh61hkIuDUoom1yOZUOQ9uHWA/AGwKiz5eSKXBQ+j8swHGR/NkGRjRyApgBe1kpFD2Vymh8Vkbju6KolMDu4BtsB+H4A8u3a4QBtMtupz5BrdRNzcQtbAtAWwMQi1B06h4wzYay6guoXU5UGcTk6qHhvExQBeBqgufOkJRA20U/JhD/3agfqmfQLdU+Te30k3wH4cgDVk9QwykZ2fiKfavvM10Mkcnd8Sq4D0ATAYjEdI/bjmlzhlfTsJvXk6Fr9UAMF4AWA3s5lS8X1B5MJRaq5ZBtpXMlH0APQIMCOlic/5xQp8kWry6fAfs7lZ9IVgOcBl9NM7azxCcp5Ps5ittXIVlN70U0FEoBXAOqXQPTcvUE/IcF+ogTEfRqlkZ9uvAegPcB51njnoxTwB1oXM51Q7weDEOzgx3mqAfh+gH9CAvLczWvWXYXlgsPoa7vjp1Y3AC0B3AVQHX6pgdk5bax28NuHfQLwCoAdyKWfEqkz6DjKjXBim30ZCLnZFoDWAN5J1C+BuFYX0fpqUZqly0ixVdwXgMYA/iUQrs1HlMJux6F2qgKhZDXv++EBAXgBIFasWLFixYr1D9d/AQAA///w5coYJMo2zgAAAABJRU5ErkJggg==" alt="">
</div>
<p class="mt-6 text-gray-600 text-center">打开<span class="text-red-500">「抖音APP」</span>扫描二维码登录</p>
</div>
<!-- 验证码登录 -->
<div class="dwo-panel hidden">
<div class="relative mt-6 px-14">
<div class="flex items-center justify-between h-13 px-2.5 py-2 rounded bg-gray-100">
<div class="flex items-center mr-1">
<input class="international-code w-8" id="international-code-1" type="text" value="+86">
<label for="international-code-1" class="dwo-icon-4 block w-4 h-4 transform duration-500"></label>
</div>
<input class="flex-1 h-full" type="text" placeholder="请输入手机号码">
</div>
<p class="h-5 mt-2 px-2.5 text-red-500"></p>
<div class="country hidden absolute left-14 top-12 w-56 h-52 rounded bg-white overflow-auto shadow-2xl">
<ul>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal text-red-500">中国</strong>
<span>+86</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国香港</strong>
<span>+852</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国澳门</strong>
<span>+853</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国台湾</strong>
<span>+886</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">阿尔巴尼亚</strong>
<span>+335</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">阿尔及利亚</strong>
<span>+213</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国</strong>
<span>+86</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国香港</strong>
<span>+852</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国澳门</strong>
<span>+853</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国台湾</strong>
<span>+886</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">阿尔巴尼亚</strong>
<span>+335</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">阿尔及利亚</strong>
<span>+213</span>
</li>
</ul>
</div>
</div>
<div class="mt-3 px-14">
<div class="flex items-center justify-between h-13 px-2.5 py-2 rounded bg-gray-100">
<input class="flex-1 h-full" type="text" placeholder="请输入验证码">
<span class="text-gray-400 cursor-pointer hover:text-red-500">获取验证码</span>
</div>
<p class="h-5 mt-2 px-2.5 text-red-500"></p>
</div>
<div class="mt-4 text-center text-gray-400">同意 <a href="javascript:" class="text-gray-600 hover:text-red-500">用户协议</a> 和 <a href="javascript:" class="text-gray-600 hover:text-red-500">隐私政策</a></div>
<div class="mt-2 px-14">
<button class="block w-full h-12 rounded text-base text-white bg-red-300 hover:bg-red-500">登录/注册</button>
</div>
</div>
<!-- 密码登录 -->
<div class="dwo-panel hidden">
<div class="relative mt-6 px-14">
<div class="flex items-center justify-between h-13 px-2.5 py-2 rounded bg-gray-100">
<div class="flex items-center mr-1">
<input class="international-code w-8" id="international-code-2" type="text" value="+86">
<label for="international-code-2" class="dwo-icon-4 block w-4 h-4 transform duration-500"></label>
</div>
<input class="flex-1 h-full" type="text" placeholder="请输入手机号码">
</div>
<p class="h-5 mt-2 px-2.5 text-red-500"></p>
<div class="country hidden absolute left-14 top-12 w-56 h-52 rounded bg-white overflow-auto shadow-2xl">
<ul>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal text-red-500">中国</strong>
<span>+86</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国香港</strong>
<span>+852</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国澳门</strong>
<span>+853</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国台湾</strong>
<span>+886</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">阿尔巴尼亚</strong>
<span>+335</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">阿尔及利亚</strong>
<span>+213</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国</strong>
<span>+86</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国香港</strong>
<span>+852</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国澳门</strong>
<span>+853</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">中国台湾</strong>
<span>+886</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">阿尔巴尼亚</strong>
<span>+335</span>
</li>
<li class="flex justify-between items-center h-10 px-3 text-gray-400 cursor-pointer hover:bg-gray-100">
<strong class="font-normal">阿尔及利亚</strong>
<span>+213</span>
</li>
</ul>
</div>
</div>
<div class="mt-3 px-14">
<div class="flex items-center justify-between h-13 px-2.5 py-2 rounded bg-gray-100">
<input class="flex-1 h-full" type="text" placeholder="请输入密码">
<span class="text-gray-400 cursor-pointer hover:text-red-500">忘记密码</span>
</div>
<p class="h-5 mt-2 px-2.5 text-red-500"></p>
</div>
<div class="mt-4 text-center text-gray-400">同意 <a href="javascript:" class="text-gray-600 hover:text-red-500">用户协议</a> 和 <a href="javascript:" class="text-gray-600 hover:text-red-500">隐私政策</a></div>
<div class="mt-2 px-14">
<button class="block w-full h-12 rounded text-base text-white bg-red-300 hover:bg-red-500">登录</button>
</div>
</div>
</div>
<!-- 关闭按钮 -->
<span class="close absolute right-2.5 top-2.5 w-9 h-9 cursor-pointer transform duration-500 ease-in-out hover:scale-125"></span>
</div>
3、CSS 代码
.h-13 {
height: 3.25rem;
}
.h-92\.5 {
height: 23.125rem;
}
.border-b-3 {
border-bottom-width: 3px;
}
body {
background-color: #000;
}
input {
outline: none;
}
input[type="text"] {
background-color: transparent;
}
.dowebok {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
width: 480px;
height: 490px;
padding: 24px 38px 19px;
border-radius: 8px;
background: #fff url("../images/login-bg.png") 0 0 / 100% no-repeat;
}
.login {
box-shadow: 0 0 60px rgb(226 97 89 / 20%);
}
.dwo-nav {
line-height: 3;
}
.dwo-icon:before {
content: "";
width: 20px;
height: 20px;
}
.dwo-icon-1:before {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAX1SURBVHgB7ZttbFNVHMafe7sWkMTdBsWovLSiqIO5DoMfnEJn4IvRZCQOlUTYNMSokG36AUzErRrRGM2YRvxgTNvEbwwZicIHDOvExCgJ7WCgvJh1akIEcd0HfFm3Hs//sttxx73dytree8f5Jc122tOke/Kc8396/meAQCAQCAQCgUAgEAgEAoFAILhRkFAMhgcDkKR2MAT4KIUvu7rwTAP9ro4Xuud0HfStClTMvlkdS0yKoGw4KiW6knAYhRfwn0EfXFKc/6ao44FfgZWPcpmGdNN8nrlonV+BTYpP+yTJzChCZaf2RHBD899gBMMpln1s3MD4s6aPBsXH+u99nGWW16sPVlkfZoE6HxyCjEIjSVW6ce+JnNMjqSRq+3vQc/miOmYMDWzU3c2WPxWEAy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4Z890+68O0xKzQrZoFqendO5UXPQ4bRY5LNV6knDVlRGFd60xk07JW7TqVg7I3o4LhL71A7vDkMShFN+t0pUKYwLwwlrAPNsZUoLGxae72F1BprhFE8ghwHunZm75Y1BRUVFRUVFRUVFRUVFRUVFRUVFR6Wf+DSJ0cGEFQyO5AAAAAElFTkSuQmCC) 50%/contain no-repeat;
}
.dwo-icon-3:before {
margin-right: 3px;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAdJSURBVHgB7ZsLcBRFHsa/nn3vJrsJISSBhKQ8PGBJEIGEu+K4uvM0Xo7DYGADd5gIFHdaKmL5qvgMllilliBYUoWFpRYliCIIBkXwFVEiSIAEiUREwQQWJCbZRx6bfUzbs5CQAcrdZNdkyu1f0rM93T29M9/089+9AIfD4XA4HA6Hw+FwOBwOh8PhcDgczu8fgr7S2GhASnwpKApBxfGoeD8N774noGof8GMD4PdjoBHYY2RpjcgzJGFOQrq9wJRapYPwFrztO8nxHS4oBr+rEF5nHbwOEXsrKQryKfQ6ymIU47REoIXmEbR2VD4Vx9kOUevN12HQqa7WwOcsh7e1nYlH8c5GiqQhihLuUjdUraXbMqdSMdvWRsfaSjCoeBz5wVInifddLYU5XtHidbtMrZE2jy08L6LV9hf8BoRuA93uYdAFPme+PwbPb1kIvLVFlmSExoD8uBR7q8+7+dOOpiNO0efFQGE0ajDjX3kwGoqxZZsZTnmTV5qQhdfSc5mPVpK2nwvIyUoPBpTO1luDJU9y9TWXveU8wxBqH3NTPXvDozCYdLmz0VB/DLmTZfcnEELrrv4nK4WzRZpTdD2ijBBGiuIe/+Z3ZFFmQYO1IyaLyYL2TvLNpuMYTHTxR5CaVoKVT1OQixVLpBS72s4yHyEiVd+EKBNaQCLk9virD8mirjVYkKO31Gm+eftjKAGtZR8mTzqECdfIgqs7W4KfBHTyZdc0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DTC0Ob/pXyqTkRMrnAu4ysZoUfE9C4q5/s8IUfkRUBNGDEaakReTDQeTQ033D1Jq+A3CXMPXmSi8erpRONNiEdtx3uQPHesJbIvxTE+TDT+RNIq8R3mXBHZZJOmN4kPE42n2/tU8AJ85oiMbYtjnA8o1UaqcPREloiy7LXq5sMhLNlE4zUMvUkdkUk/aXrdnA9oMC3vJ26gGsdtpYrIwYnGp8Rxh/3+8ezc/FF03af2NGDQ38FB/2hubv5bvC5P42/HL/HjdTy18nbnR8e5jzpwPiB1eNDfnW3Pb5iBfuaW6InoTPxv34r5GP9Vr/U6nT9SM40oXsevw3UUuSsakr7pOJDPcjt65WI8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQJX+ATc9oF5n57RZAAAAAElFTkSuQmCC) 50% / cover;
}
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-button {
width: 0;
height: 0;
}
::-webkit-scrollbar-thumb {
min-height: 28px;
padding-top: 100;
background-color: rgba(0, 0, 0, .1);
-webkit-background-clip: padding-box;
background-clip: padding-box;
border-radius: 4px;
}
4、JS 代码
$(function() {
const $nav_items = $('.dwo-nav').find('li')
const $panels = $('.dwo-panel')
$nav_items.each(function(index, item) {
$(item).on('click', function() {
$(this).addClass('border-b-3 border-solid border-red-500').siblings().removeClass('border-b-3 border-solid border-red-500')
$panels.eq(index).removeClass('hidden').siblings('.dwo-panel').addClass('hidden')
})
})
const $international_code = $('.international-code')
const $country = $('.country')
$international_code.each(function(index, item) {
$(item).on({
focus: function() {
$(this).next().addClass('rotate-180')
$country.eq(index).removeClass('hidden')
},
blur: function() {
$(this).next().removeClass('rotate-180')
$country.eq(index).addClass('hidden')
}
})
})
})
到这里就制作完了,查看效果:https://www.dowebok.com/demo/10401/