以下是在 JavaScript 和 Google 地圖 API 中添加點擊事件,根據國家進行不同操作的示例代碼:
//創建地圖對象 var map = new google.maps.Map(document.getElementById('map'), { zoom: 4, center: {lat: 37.0902, lng: -95.7129} }); //創建信息窗口(infowindow) var infowindow = new google.maps.InfoWindow(); //創建一個數組來存儲標記 var markers = []; //為每個國家添加點擊事件 google.maps.event.addListener(map, 'click', function(event) { //獲取點擊位置的經緯度坐標 var latLng = event.latLng; //使用地理編碼器(geocoder)將經緯度坐標轉換為地址信息 var geocoder = new google.maps.Geocoder(); geocoder.geocode({'location': latLng}, function(results, status) { if (status === 'OK') { if (results[0]) { //獲取點擊位置所在的國家名稱 var countryName = ''; for (var i = 0; i < results[0].address_components.length; i++) { var component = results[0].address_components[i]; if (component.types.indexOf('country') !== -1) { countryName = component.long_name; break; } } //根據國家名稱執行相應操作 switch (countryName) { case 'China': alert('您點擊了中國'); break; case 'United States': alert('您點擊了美國'); break; default: alert('您點擊了' + countryName); } //創建標記并將其添加到地圖上 var marker = new google.maps.Marker({ position: latLng, map: map });
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~ 希望得到建議咨詢、商務合作,也請與我們聯系01063334945。 分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。 藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
要用 Cesium.js 制作一個球形地圖,可以按照以下步驟:
在 HTML 文件中添加 Cesium.js 庫文件的引用??梢酝ㄟ^以下方式獲取最新版的 Cesium.js 庫文件鏈接:https://cesium.com/downloads/。
創建一個 div 元素來容納地球場景,并設置其樣式以占滿整個屏幕。
在 JavaScript 文件中創建 Cesium.Viewer 對象并將其附加到之前創建的 div 元素上。這將在屏幕上顯示一個球體,并啟動 Cesium.js 場景。
可以通過更改 Viewer 對象的屬性來自定義地球的外觀和行為。例如,可以更改攝像機的位置和方向、加載不同類型的地圖數據、添加標記等等。
以下是一個簡單的示例代碼:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>My Cesium App</title> <style> #cesiumContainer { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } </style> <script src="https://cesium.com/downloads/cesiumjs/releases/1.85/Build/Cesium/Cesium.js"></script> <link rel="stylesheet"> </head> <body> <div id="cesiumContainer"></div> <script> var viewer = new Cesium.Viewer('cesiumContainer'); </script> </body> </html>
這將創建一個簡單的地球場景,可以在其中添加更
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~ 希望得到建議咨詢、商務合作,也請與我們聯系01063334945。 分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。 藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
目錄
動畫(animation)是CSS3中具有顛覆性的特征之一,可通過設置多個節點來精確控制一個或一組動畫,常 用來實現復雜的動畫效果。
相比較過渡,動畫可以實現更多變化,更多控制,連續自動播放等效果。
制作動畫分為兩步: 1.先定義動畫 2.再使用(調用)動畫
1. 用keyframes 定義動畫(類似定義類選擇器)
@keyframes 動畫名稱 {
0%{
width:100px;
}
100%{
width:200px;
}
}
動畫序列
0% 是動畫的開始,100% 是動畫的完成。這樣的規則就是動畫序列。
在 @keyframes 中規定某項 CSS 樣式,就能創建由當前樣式逐漸改為新樣式的動畫效果。
動畫是使元素從一種樣式逐漸變化為另一種樣式的效果。您可以改變任意多的樣式任意的次數。
請用百分比來規定變化發生的時間,或用關鍵詞 "from" 和 "to",等同于 0% 和 100%。
2. 元素使用動畫
div {
width: 200px;
height: 200px;
background-color: aqua;
margin: 100px auto; /* 調用動畫 */
animation-name: 動畫名稱;
/* 持續時間 */ animation-duration: 持續時間; }
-
<!DOCTYPE html>
-
<html lang="en">
-
-
<head>
-
<meta charset="UTF-8">
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
-
<title>Document</title>
-
<style>
-
/* 我們想頁面一打開,一個盒子就從左邊走到右邊 */
-
/* 1. 定義動畫 */
-
-
@keyframes move {
-
/* 開始狀態 */
-
0% {
-
transform: translateX(0px);
-
}
-
/* 結束狀態 */
-
100% {
-
transform: translateX(1000px);
-
}
-
}
-
-
div {
-
width: 200px;
-
height: 200px;
-
background-color: pink;
-
/* 2. 調用動畫 */
-
/* 動畫名稱 */
-
animation-name: move;
-
/* 持續時間 */
-
animation-duration: 2s;
-
}
-
</style>
-
</head>
-
-
<body>
-
<div></div>
-
</body>
-
-
</html>
-
<!DOCTYPE html>
-
<html lang="en">
-
-
<head>
-
<meta charset="UTF-8">
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
-
<title>Document</title>
-
<style>
-
/* from to 等價于 0% 和 100% */
-
/* @keyframes move {
-
from {
-
transform: translate(0, 0);
-
}
-
to {
-
transform: translate(1000px, 0);
-
}
-
} */
-
/* 動畫序列 */
-
/* 1. 可以做多個狀態的變化 keyframe 關鍵幀 */
-
/* 2. 里面的百分比要是整數 */
-
/* 3. 里面的百分比就是 總的時間(我們這個案例10s)的劃分 25% * 10 = 2.5s */
-
-
@keyframes move {
-
0% {
-
transform: translate(0, 0);
-
}
-
25% {
-
transform: translate(1000px, 0)
-
}
-
50% {
-
transform: translate(1000px, 500px);
-
}
-
75% {
-
transform: translate(0, 500px);
-
}
-
100% {
-
transform: translate(0, 0);
-
}
-
}
-
-
div {
-
width: 100px;
-
height: 100px;
-
background-color: pink;
-
animation-name: move;
-
animation-duration: 10s;
-
}
-
</style>
-
</head>
-
-
<body>
-
<div>
-
-
</div>
-
</body>
-
-
</html>
-
<!DOCTYPE html>
-
<html lang="en">
-
-
<head>
-
<meta charset="UTF-8">
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
-
<title>Document</title>
-
<style>
-
@keyframes move {
-
0% {
-
transform: translate(0, 0);
-
}
-
100% {
-
transform: translate(1000px, 0);
-
}
-
}
-
-
div {
-
width: 100px;
-
height: 100px;
-
background-color: pink;
-
/* 動畫名稱 */
-
animation-name: move;
-
/* 持續時間 */
-
/* animation-duration: 2s; */
-
/* 運動曲線 */
-
/* animation-timing-function: ease; */
-
/* 何時開始 */
-
animation-delay: 1s;
-
/* 重復次數 iteration 重復的 conut 次數 infinite 無限 */
-
/* animation-iteration-count: infinite; */
-
/* 是否反方向播放 默認的是 normal 如果想要反方向 就寫 alternate */
-
/* animation-direction: alternate; */
-
/* 動畫結束后的狀態 默認的是 backwards 回到起始狀態 我們可以讓他停留在結束狀態 forwards */
-
/* animation-fill-mode: forwards; */
-
/* animation: name duration timing-function delay iteration-count direction fill-mode; */
-
/* animation: move 2s linear 0s 1 alternate forwards; */
-
/* 前面2個屬性 name duration 一定要寫 */
-
/* animation: move 2s linear alternate forwards; */
-
}
-
-
div:hover {
-
/* 鼠標經過div 讓這個div 停止動畫,鼠標離開就繼續動畫 */
-
animation-play-state: paused;
-
}
-
</style>
-
</head>
-
-
<body>
-
<div>
-
-
</div>
-
</body>
-
-
</html>
linear 勻速
animation:動畫名稱 持續時間 運動曲線 何時開始 播放次數 是否反方向 動畫起始或者結束的狀態
animation: myfirst 5s linear 2s infinite alternate;
簡寫屬性里面不包含 animation-play-state
暫停動畫:animation-play-state: puased; 經常和鼠標經過等其他配合使用
想要動畫走回來 ,而不是直接跳回來:animation-direction : alternate
盒子動畫結束后,停在結束位置: animation-fill-mode : forwards
還沒聽。。
animation-timing-function:規定動畫的速度曲線,默認是“ease“
-
<!DOCTYPE html>
-
<html lang="en">
-
-
<head>
-
<meta charset="UTF-8">
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
-
<title>Document</title>
-
<style>
-
div {
-
overflow: hidden;
-
font-size: 20px;
-
width: 0;
-
height: 30px;
-
background-color: pink;
-
/* 讓我們的文字強制一行內顯示 */
-
white-space: nowrap;
-
/* steps 就是分幾步來完成我們的動畫 有了steps 就不要在寫 ease 或者linear 了 */
-
animation: w 4s steps(10) forwards;
-
}
-
-
@keyframes w {
-
0% {
-
width: 0;
-
}
-
100% {
-
width: 200px;
-
}
-
}
-
</style>
-
</head>
-
-
<body>
-
<div>世紀佳緣我在這里等你</div>
-
</body>
-
-
</html>
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~ 希望得到建議咨詢、商務合作,也請與我們聯系01063334945。 分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。 藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
一、CSS3 2D變形(利用Transfrom方法)
1、rotate(angle)
元素順時針旋轉給定的角度。允許負值,元素將逆時針旋轉。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<style>
div{
width: 100px;
height: 100px;
border: 1px solid red;
transform: rotate(30deg) ;
margin: 200px auto;
}
</style>
<body>
<div>
</div>
</body>
</html>
效果如圖
如果當rotate里面的值為負數時,比如ratate(-10deg),效果如圖:
2、 translate(x,y)方法
通過 translate() 方法,元素從其當前位置移動,根據給定的 left(x 坐標) 和 top(y 坐標) 位置參數。也就是相對于頁面左部和頂部的距離
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <style> div { width: 100px; height: 100px; border: 1px solid red; transform: translate(20px, 20px); } </style> <body> <div></div> </body> </html>
![]()
效果如下
初次之外還有其他的參數
transform: translate(200px);
如果只帶一個參數,這個參數代表的是x方向位移值,y方向位移為0
transform: translateX(200px);
對X方向移動
transform: translateY(200px);
對Y方向移動
3、scale() 方法
通過 scale() 方法,元素的尺寸會增加或減少,根據給定的寬度(X 軸)和高度(Y 軸)參數
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <style> div { width: 100px; height: 100px; border: 1px solid red; transform: scale(2,0.5); margin: 20px auto; } </style> <body> <div></div> </body> </html>
![]()
效果如圖
可以看到,長邊變為了原來的兩倍,寬邊變為了原來的0.5倍
transform: scale(1.5);x軸和y軸都放大1.5倍
transform: scaleX(1.5);x軸放大1.5倍
transform: scaleY(1.5);y軸放大1.5倍
transform-origin: left top;改變中心點位置為左上角,當然還可以自由搭配,右下(right bottom),右上(right top)
4、 skew() 方法
通過 skew() 方法,元素翻轉給定的角度,根據給定的水平線(X 軸)和垂直線(Y 軸)參數。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <style> div { width: 100px; height: 100px; border: 1px solid red; transform: skew(30deg,30deg); margin: 200px auto; } </style> <body> <div></div> </body> </html>
![]()
效果如圖
意思就是:圍繞 X 軸把元素翻轉 30 度,圍繞 Y 軸翻轉 30 度??赡芸雌饋肀容^抽象
transform: skew(230deg);如果只帶一個參數,只有x軸方向的扭曲
transform: skewX(230deg); 對X軸進行翻轉
transform: skewY(230deg); 對Y軸進行翻轉
其實還是很好理解的,比如兩個圖疊加在一起
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <style> .demo{ width: 200px; height: 200px; margin: 200px auto; border: 1px solid #000; } .box{ width: 200px; height: 200px; border: 1px solid red; transform: skew(5deg,0deg); } </style> <body> <div class="demo"> <div class="box"></div> </div> </body> </html>
![]()
可以看到,所謂的X軸翻轉,其實就是x方向的移動,上面的線向左移動5px,下面的線向右移動5px,加入Y也一樣
比如:transform: skew(0deg,5deg);
左邊的線向上移動5px,右邊的線向下移動5px,同時改變時 transform: skew(5deg,5deg);
最好記的方式就是對角線的同時移動,左上右下是排斥,左下右上是吸引
5、matrix() 方法
matrix() 方法把所有 2D 轉換方法組合在一起。
matrix() 方法需要六個參數,包含數學函數,允許您:旋轉、縮放、移動以及傾斜元素。
如題:將div右移100px,下移200px,旋轉30度,x軸縮放1.5倍,y軸縮放2倍。
(1)transform: translate(100px, 200px) rotate(30deg) scale(1.5, 2);
(2)transform: matrix(1.299, 0.75, -1, 1.732, 100, 200)
計算方法
效果如圖
6、transform-origin 屬性
允許你改變被轉換元素的位置
語法: transform-origin: x-axis y-axis z-axis;
屬性值:
x-axis :定義視圖被置于 X 軸的何處。可能的值:left,center,right,length,%。
y-axis :定義視圖被置于 Y 軸的何處??赡艿闹担簍op,center,bottom,length,%。
z-axis :定義視圖被置于 Z 軸的何處??赡艿闹担簂ength。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>transform-origin</title> <style> *{ margin: 0; padding: 0; } .demo{ width: 200px; height: 200px; margin: 200px auto; border: 1px solid #000; } .box{ width: 200px; height: 200px; background-color: #f00; transform: rotate(60deg); transform-origin: right bottom; } </style> </head> <body> <div class="demo"> <div class="box"></div> </div> </body> </html>
![]()
效果如圖
形象的來說,就是規定你從哪個角開始旋轉,比如規定右下角旋轉,則圖形以右下角為旋轉角,順時針旋轉60°
二、CSS3 3D變形
1、perspective屬性
perspective 屬性定義 3D 元素距視圖的距離,以像素計。該屬性允許您改變 3D 元素查看 3D 元素的視圖。
當為元素定義 perspective 屬性時,其子元素會獲得透視效果,而不是元素本身。
注釋:perspective 屬性只影響 3D 轉換元素。
語法: perspective: number|none;
屬性值:
number :元素距離視圖的距離,以像素計。
none :默認值。與 0 相同。不設置透視
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>perspective</title> <style> .father{ position: relative; width: 200px; height: 200px; padding: 10px; margin: 200px auto; border: 1px solid #999; perspective: 150px; } .son{ width: 100px; height: 50px; padding: 50px; position: absolute; border: 1px solid #f00; background-color: #0ff; transform: rotateX(45deg); } </style> </head> <body> <div class="father"> <div class="son"></div> </div> </body> </html>
![]()
效果如圖
2、trasform-style屬性
transform-style 屬性規定如何在 3D 空間中呈現被嵌套的元素。
注釋:該屬性必須與 transform 屬性一同使用。
語法: transform-style: flat|preserve-3d;
屬性值:
flat :子元素將不保留其 3D 位置。
preserve-3d :子元素將保留其 3D 位置。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>transform-style</title> <style> .wrapper{ width: 200px; height: 100px; margin: 200px auto; } .div1,.div2{ width: 200px; height: 100px; padding: 20px; } .div1{ background-color: #f00; transform: rotateY(30deg); transform-style: preserve-3d; } .div2{ background-color: #655fff; transform: rotateY(45deg); } </style> </head> <body> <div class="wrapper"> <div class="div1">div1 <div class="div2">div2</div> </div> </div> </body> </html>
![]()
效果如圖
3、CSS3過渡
transition 屬性是一個簡寫屬性,用于設置四個過渡屬性:
transition-property:規定設置過渡效果的 CSS 屬性的名稱。
transition-duration:規定完成過渡效果需要多少秒或毫秒。
transition-timing-function:規定速度效果的速度曲線。
transition-delay:定義過渡效果何時開始。
注釋:請始終設置 transition-duration 屬性,否則時長為 0,就不會產生過渡效果。
語法: transition: property duration timing-function delay;
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>transition過渡動畫</title> <style> .box{ width: 100%; height: 300px; position: relative; border: 1px solid #eee; } .demo{ width: 100px; height: 100px; background-color: #f00; position: absolute; left: 100px; top: 100px; transform: rotate(0deg); transition-property: all; transition-duration: .8s; } .box:hover .demo{ left: 500px; width: 300px; transform: rotate(45deg); } </style> </head> <body> <div class="box"> <div class="demo"></div> </div> </body> </html>
![]()
或者
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>transition過渡動畫</title> <style> .box{ width: 100%; height: 300px; position: relative; border: 1px solid #eee; } .demo{ width: 100px; height: 100px; background-color: #f00; position: absolute; left: 100px; top: 100px; transform: rotate(0deg); transition: left 2s ease 500ms, width 5s ease-in-out; } .box:hover .demo{ left: 500px; width: 300px; transform: rotate(45deg); } </style> </head> <body> <div class="box"> <div class="demo"></div> </div> </body> </html>
![]()
可以自行實驗一下
4、CSS3動畫
使用@keyframes
通過 @keyframes 規則,您能夠創建動畫。
創建動畫的原理是,將一套 CSS 樣式逐漸變化為另一套樣式。
在動畫過程中,您能夠多次改變這套 CSS 樣式。
以百分比來規定改變發生的時間,或者通過關鍵詞 “from” 和 “to”,等價于 0% 和 100%。
0% 是動畫的開始時間,100% 動畫的結束時間。
為了獲得最佳的瀏覽器支持,您應該始終定義 0% 和 100% 選擇器。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>關鍵幀動畫</title> <style> .box{ width: 100%; height: 800px; position: relative; } .demo{ width: 100px; height: 100px; background-color: #ff0000; -webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%; position: absolute; /*animation: move 5s ease-in-out infinite alternate ;*/ -webkit-animation: move 5s ease-in-out 500ms 2 alternate ; -moz-animation: move 5s ease-in-out 500ms 2 alternate ; -ms-animation: move 5s ease-in-out 500ms 2 alternate ; -o-animation: move 5s ease-in-out 500ms 2 alternate ; animation: move 5s ease-in-out 500ms 2 alternate ; } @keyframes move { 0%{ left: 100px; } 45%{ left: 200px; top: 100px; background-color: #00f; } 75%{ left: 400px; top: 300px; background-color: #64ff77; } 100%{ left: 500px; top: 500px; background-color: #ff4975; } } </style> </head> <body> <div class="box"> <div class="demo"></div> </div> </body> </html>
![]()
或者
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>關鍵幀動畫</title> <style> .box{ width: 100%; height: 800px; position: relative; } .demo{ width: 100px; height: 100px; background-color: #ff0000; -webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%; position: absolute; /*animation: move 5s ease-in-out infinite alternate ;*/ -webkit-animation: move 5s ease-in-out 500ms 2 alternate ; -moz-animation: move 5s ease-in-out 500ms 2 alternate ; -ms-animation: move 5s ease-in-out 500ms 2 alternate ; -o-animation: move 5s ease-in-out 500ms 2 alternate ; animation: move 5s ease-in-out 500ms 2 alternate ; } @keyframes move { from{ left: 100px; } to{ left: 500px; background-color: #00f; } } </style> </head> <body> <div class="box"> <div class="demo"></div> </div> </body> </html>
![]()
animation:move 5s ease-in-out 500ms 2 alternate
move:表示animation-name ,動畫名稱
5s:表示animation-duration,時長
ease-in-out:表示animation-timing-function 規定動畫的速度曲線
(
除此以外還有:
linear:動畫從頭到尾的速度是相同的。
ease:默認。動畫以低速開始,然后加快,在結束前變慢。
ease-in:動畫以低速開始。
ease-out:動畫以低速結束。
ease-in-out:動畫以低速開始和結束。
)
500ms:表示animation-delay,規定在動畫開始之前的延遲。
2 :表示animation-iteration-count,規定動畫應該播放的次數。
alternate:表示animation-direction,規定是否應該輪流反向播放動畫,如果 animation-direction 值是 “alternate”,則動畫會在奇數次數(1、3、5 等等)正常播放,而在偶數次數(2、4、6 等等)向后播放。。
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~
希望得到建議咨詢、商務合作,也請與我們聯系01063334945。
分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。
藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
本篇文章通過代碼示例介紹一下使用純CSS畫圓環的方法。有一定的參考價值,有需要的朋友可以參考一下,希望對大家有所幫助。
畫圓環思想很簡單:首先畫兩個圓,設置不同的背景色;然后讓兩個圓的圓心重合即可。
難度系數
☆☆
HTML
解析:此處有父容器
CSS.container {
position: relative;
top: 0;
left: 0;
width: 300px;
height: 300px;
background-color: lightgrey;
}
.ring-style {
display: inline-block;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: blue;
width: 260px;
height: 260px;
border-radius: 260px;
}
.ring-style::before {
content: ' ';
display: inline-block;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
width: 200px;
height: 200px;
border-radius: 200px;
}
解析:設置元素的寬高、圓角效果,即可畫出一個圓
通過 ::before 偽元素和本體元素,創建兩個圓
通過基于父容器的絕對定位,設置 top、left、translate 屬性,讓元素基于父容器水平、豎直居中,即可讓兩個圓的圓心重合
【推薦教程:CSS視頻教程 】
效果圖
知識點border-radius
::before && ::after
元素水平、豎直居中
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~
希望得到建議咨詢、商務合作,也請與我們聯系01063334945。
分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。
藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
Echarts的legend屬性是對圖例組件的相關配置
而legend就是Echarts圖表中對圖形的解釋部分:
其中legend自身常用的配置屬性如下:
設置圖例的朝向
屬性值:
vertical // 垂直顯示
或者
horizontal // 水平顯示
legend: { orient: 'vertical' }
legend: { orient: 'horizontal' }
設置圖例在X軸方向上的位置以及在Y軸方向上的位置
位置 | 取值 |
---|---|
x/left | left/center/right |
y /top | top/center/bottom |
例子:
legend: { orient: 'vertical', x:'right', y:'center' }
屬性 | 說明 |
---|---|
backgroundColor | 背景顏色 |
borderColor | 邊框顏色 |
borderWidth | 邊框寬度 |
padding | 內邊距 |
注意:邊框寬度和內邊距屬性值為數值,不加單位。
legend: { orient: 'vertical', x:'center', y:'top', backgroundColor: '#fac858', borderColor: '#5470c6', borderWidth: '200', }
控制每一項的間距,也就是圖例之間的距離
屬性值為數值,不帶單位
legend: { orient: 'horizontal', x:'center', y:'top', itemGap: 40 }
控制圖例圖形的高度
屬性值為數字,不加單位
legend: { orient: 'horizontal', x:'center', y:'top', itemHeight: 5 }
設置圖例文字樣式
屬性值為一個對象
legend: { orient: 'horizontal', x:'center', y:'top', textStyle: { color: 'red', fontSize: '20px', fontWeight: 700 } }
設置圖例的某個選項的數據默認是顯示還是隱藏。
false: 隱藏
屬性值:對象,屬性值內容:圖例上的數據與boolean構成鍵值對
如果某選項設置為false,那么圖標上的數據也會默認不顯示,而圖例會以灰色樣式顯示
legend: { orient: 'horizontal', x:'center', y:'top', selected:{ '搜索引擎': false, '聯盟廣告': false } }
圖例上顯示的文字信息,如果不設置該項,默認會以series設置的信息作為圖例信息。如果設置該項,必須與series設置的信息一致,才會生效。
而該屬性的作用:可以單獨對圖例中某個選項進行單獨設置樣式
比如:
legend: { orient: 'horizontal', x:'center', y:'top', data:[{ name: '搜索引擎', icon: 'circle', textStyle: {fontWeight: 'bold', color: 'orange'} },'直接訪問','郵件營銷','聯盟廣告','視頻廣告'] }
以上單獨設置中
name:指定該項的名稱,必填
icon:指定圖例項的icon,可以為內置的圖形7個圖形,或者自定義圖標的形式:'image://url'
textStyle::設置文本樣式
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~
希望得到建議咨詢、商務合作,也請與我們聯系01063334945。
分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。
藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
今天用WebStorm
運行前端代碼時,發現不太好打斷點。
于是,打算改用VSCode
來運行前端代碼,但前提是要安裝VSCode
,如下便是超詳細的VSCode
安裝教程以及解決VSCode
下載速度特別慢的問題。
VSCode
官網
download
下載
你會發現VSCode
官網地址下載很慢,或者下著下著就暫停了,如下圖所示:
如果下載完成,那得等到猴年馬月。
我是用chrome
瀏覽器,點擊右下角的全部顯示按鈕,可以跳轉到下載內容頁面。
如果你是用其他瀏覽器,可能使用其他方式跳轉到下載內容頁面。
vscode.cdn.azure.cn
即https://az764295.vo.msecnd.net/stable/129500ee4c8ab7263461ffe327268ba56b9f210d/VSCodeUserSetup-x64-1.72.1.exe
修改為https://vscode.cdn.azure.cn/stable/129500ee4c8ab7263461ffe327268ba56b9f210d/VSCodeUserSetup-x64-1.72.1.exe
將替換后的地址輸入到瀏覽器的地址欄中,如下圖所示,按enter
鍵即可快速下載。
速度是不是立刻提升了。
因為我的系統盤(C盤)
的內存不夠用了,需要更換到其他盤符,我更換到D盤
中。
如果你不想更換到其他盤符,可以直接下一步即可。
VSCode
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~
希望得到建議咨詢、商務合作,也請與我們聯系01063334945。
分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。
藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
本章用到......uni-app頁面跳轉uni.navigateTo方法、uni.navigateBack方法。uni-app簡單實現郵箱驗證碼發送點擊后讀秒樣式。登錄賬號、密碼正則表達式驗證等
適合剛入門的小伙伴,大佬就沒必要看了
靜態頁面!靜態頁面!沒有綁定后端數據接口
目錄
https://dcloud.io/hbuilderx.html
官網直接下載解壓即可
文件-新建-項目
我這里直接選擇默認模板,Vue版本、uniCloud自行選擇即可
創建完成后自動生成文件夾
文件名這里自動生成原本是index,文件名自行定義即可
頁面文件自己新建Vue文件即可
注意??!這個文件后續如果需要新添加新頁面時這個文件里一定要配置參數不然頁面出不來,代碼格式看下面代碼↓↓↓↓↓↓↓↓↓
{ // 設置單頁面 "pages": [ //pages數組中第一項表示應用啟動頁,參考:https://uniapp.dcloud.io/collocation/pages { "path": "pages/login/login", "style": { // 設置頂部導航欄 "navigationBarTitleText": "", "navigationBarBackgroundColor": "#FFFFFF" } }, { "path": "pages/login/findBack", "style": { "navigationBarTitleText": "找回密碼" } }, { "path": "pages/login/mailFindBack", "style": { "navigationBarTitleText": "郵箱找回密碼" } }, { "path": "pages/login/phoneVerify", "style": { "navigationBarTitleText": "", "navigationBarBackgroundColor": "#FFFFFF" } }, { "path": "pages/login/emailFinish", "style": { "navigationBarTitleText": "" } } { //新添加的Vue頁面配置?。?! "path": "", "style": { "navigationBarTitleText": "" } } ], // 設置全部頁面 "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" }, "uniIdRouter": {}, // 設置底部導航欄 "tabBar": { } }![]()
類似navigationBarTitleText(導航欄text)、navigationBarBackgroundColor(導航欄背景色)等等屬性可以查看相關資料自行配置即可
pages里設置單頁面參數,每個頁面配置對應path路徑參數
globalStyle里設置全局頁面參數
js、josn、scss文件等等其他配置文件這里就不多說了自行研究吧?。?!因為我也還沒搞清楚到底怎么用哈哈哈
進入正題↓↓↓↓↓↓↓↓↓↓↓↓↓代碼看著有些亂........湊合看慢慢理解吧
代碼里的src圖片鏈接自行修改?。。。。ㄟ€有css里的URL)
先看一下效果圖
-
<!-- 登錄頁面 -->
-
<template>
-
<view class="flex-col flex-auto group">
-
<text class="self-center text_2" v-if="type==1000">手機號登錄</text>
-
<text class="self-center text_2" v-if="type==2000">賬號登錄</text>
-
<!-- 手機號登錄 -->
-
<view class="" v-if="type==1000">
-
<view class="flex-col justify-start items-start text-wrapper">
-
<input type="text" class="font_1" @input="onInput" placeholder="請輸入手機號" v-model="phoneNumber">
-
</view>
-
<!-- svg畫線 -->
-
<view style="height: 1px;">
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
-
<line x1="0" y1="0" x2="400" y2="0" style="stroke:rgb(0,0,0);stroke-width:0.2" />
-
</svg>
-
</view>
-
-
<view class="flex-col justify-start items-start text-wrapper_2">
-
<input type="text" password="true" class="font_1" @input="onInput" placeholder="請輸入密碼" v-model="phonePassword">
-
</view>
-
-
<!-- svg畫線 -->
-
<view style="height: 1px;">
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
-
<line x1="0" y1="0" x2="400" y2="0" style="stroke:rgb(0,0,0);stroke-width:0.2" />
-
</svg>
-
</view>
-
</view>
-
<!-- 賬號登錄 -->
-
<view class="" v-if="type==2000">
-
<view class="flex-col justify-start items-start text-wrapper">
-
<input type="text" class="font_1" @input="onInput" placeholder="請輸入用戶名" v-model="idNumber">
-
</view>
-
<!-- svg畫線 -->
-
<view style="height: 1px;">
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
-
<line x1="0" y1="0" x2="400" y2="0" style="stroke:rgb(0,0,0);stroke-width:0.2" />
-
</svg>
-
</view>
-
<view class="flex-col justify-start items-start text-wrapper_2">
-
<input type="text" password="true" class="font_1" @input="onInput" placeholder="請輸入用戶密碼" v-model="idPassword">
-
</view>
-
<!-- svg畫線 -->
-
<view style="height: 1px;">
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
-
<line x1="0" y1="0" x2="400" y2="0" style="stroke:rgb(0,0,0);stroke-width:0.2" />
-
</svg>
-
</view>
-
</view>
-
-
<view class="self-start font_1 text_3" @click="type=2000" v-if="type==1000">用賬號登錄</view>
-
<view class="self-start font_1 text_3" @click="type=1000" v-if="type==2000">用手機號登錄</view>
-
<!-- 登錄按鈕1 -->
-
<view class="flex-col justify-start items-center button" v-if="btnShow">
-
<button class="font_1 text_4" @click="onSubmit">登 錄</button>
-
</view>
-
<!-- 登錄按鈕2 -->
-
<view class="flex-col justify-start items-center button2" v-else>
-
<button class="font_1 text_66">登 錄</button>
-
</view>
-
-
-
<view class="flex-row justify-between group_2" v-if="type==1000">
-
<text class="font_2" @click="onPageJump('/pages/login/phoneVerify')">短信驗證碼登錄</text>
-
<text class="font_2" @click="onPageJump('/pages/login/findBack')">找回密碼</text>
-
</view>
-
<view class="flex-row justify-between group_3" v-else>
-
<text class="font_2" @click="onPageJump('/pages/login/findBack')">找回密碼</text>
-
</view>
-
</view>
-
-
</template>
-
-
<script>
-
export default {
-
components:{
-
-
},
-
data() {
-
return {
-
type: 1000, //判斷登錄類型手機登錄或賬號登錄
-
phoneNumber:'', //手機賬號
-
phonePassword:'', //手機密碼
-
idNumber:'', //賬號
-
idPassword:'', //賬號密碼
-
btnShow:false, //判斷登錄按鈕顯示隱藏
-
timeOut:null, //添加定時器
-
}
-
},
-
onLoad() {
-
-
},
-
created() {
-
-
},
-
// 方法
-
methods: {
-
// 找回密碼跳轉頁面
-
onPageJump(url) {
-
uni.navigateTo({
-
url: url
-
});
-
},
-
// 判斷顯示登錄按鈕
-
onInput() {
-
this.timeOut && clearTimeout(this.timeOut)
-
this.timeOut = setTimeout(() => {
-
if (this.type == 1000) {
-
if (this.phoneNumber && this.phonePassword) {
-
this.btnShow = true;
-
} else {
-
this.btnShow = false;
-
}
-
} else {
-
if (this.idNumber && this.idPassword) {
-
this.btnShow = true;
-
} else {
-
this.btnShow = false;
-
}
-
}
-
}, 100);
-
},
-
// 點擊登錄
-
onSubmit(){
-
// 判斷登錄方式為手機號登錄
-
if(this.type==1000){
-
// 判斷驗證手機號
-
if(!this.phoneNumber){
-
uni.showToast({
-
title: '請輸入手機號',
-
icon: 'none',
-
});
-
return;
-
}
-
const phoneNumber= /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
-
if(!phoneNumber.test(this.phoneNumber)){
-
uni.showToast({
-
title: '手機號輸入不正確',
-
icon: 'none',
-
});
-
return;
-
}
-
// 判斷驗證手機密碼
-
if(!this.phonePassword){
-
uni.showToast({
-
title: '請輸入密碼',
-
icon: 'none',
-
});
-
return;
-
}
-
uni.showToast({
-
title: '正在登錄',
-
icon: 'loading',
-
});
-
}else{
-
// 判斷驗證賬號
-
if(!this.idNumber){
-
uni.showToast({
-
title: '請輸入賬號',
-
icon: 'none',
-
});
-
return;
-
}
-
// 判斷驗證賬號密碼
-
if(!this.idPassword){
-
uni.showToast({
-
title: '請輸入賬號密碼',
-
icon: 'none',
-
});
-
return;
-
}
-
uni.showToast({
-
title: '正在登錄',
-
icon: 'loading',
-
});
-
}
-
},
-
-
-
-
-
}
-
}
-
</script>
-
-
<style>
-
@import"../../style/css/login.css";
-
</style>
一個小tips:
先說一下這個頁面↑↑↑↑↑↑↑↑↑↑↑↑↑↑
svg因為我這里賬號、密碼input輸入框的border邊框要設置成小數1px以下0.1px、0.2px、0.3px等等,所以這里用了svg的畫圖,如果有小伙伴碰到同樣問題可以參考一下,不需要的直接style里直接設置border參數即可
uni.showToast是uni-app彈出框的方法直接用就行,參數么。。自己研究研究就行 (例:icon圖標參數有四種類型none、loading、success、error)
style外部引用css樣式直接用@import相對路徑即可
style樣式最好還是用自己寫的就別直接復制了,我這里用的是平臺自動生成的所以比較亂隨便看看就行了看多了頭疼(僅供參考全局樣式可以直接略過)
-
/************************************************************
-
** 全局樣式 ** **
-
************************************************************/
-
html {
-
font-size: 16px;
-
}
-
-
body {
-
margin: 0;
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
-
'Droid Sans', 'Helvetica Neue', 'Microsoft Yahei', sans-serif;
-
-webkit-font-smoothing: antialiased;
-
-moz-osx-font-smoothing: grayscale;
-
}
-
-
view,
-
image,
-
text {
-
box-sizing: border-box;
-
flex-shrink: 0;
-
}
-
-
#app {
-
width: 100vw;
-
height: 100vh;
-
}
-
-
.flex-row {
-
display: flex;
-
flex-direction: row;
-
}
-
-
.flex-col {
-
display: flex;
-
flex-direction: column;
-
}
-
-
.justify-start {
-
justify-content: flex-start;
-
}
-
-
.justify-end {
-
justify-content: flex-end;
-
}
-
-
.justify-center {
-
justify-content: center;
-
}
-
-
.justify-between {
-
justify-content: space-between;
-
}
-
-
.justify-around {
-
justify-content: space-around;
-
}
-
-
.justify-evenly {
-
justify-content: space-evenly;
-
}
-
-
.items-start {
-
align-items: flex-start;
-
}
-
-
.items-end {
-
align-items: flex-end;
-
}
-
-
.items-center {
-
align-items: center;
-
}
-
-
.items-baseline {
-
align-items: baseline;
-
}
-
-
.items-stretch {
-
align-items: stretch;
-
}
-
-
.self-start {
-
align-self: flex-start;
-
}
-
-
.self-end {
-
align-self: flex-end;
-
}
-
-
.self-center {
-
align-self: center;
-
}
-
-
.self-baseline {
-
align-self: baseline;
-
}
-
-
.self-stretch {
-
align-self: stretch;
-
}
-
-
.flex-1 {
-
flex: 1 1 0%;
-
}
-
-
.flex-auto {
-
flex: 1 1 auto;
-
}
-
-
.grow {
-
flex-grow: 1;
-
}
-
-
.grow-0 {
-
flex-grow: 0;
-
}
-
-
.shrink {
-
flex-shrink: 1;
-
}
-
-
.shrink-0 {
-
flex-shrink: 0;
-
}
-
-
.relative {
-
position: relative;
-
}
-
-
/* ---------------------------------------------------------------------- */
-
-
.group {
-
padding: 20px 40px 10px;
-
overflow-y: auto;
-
}
-
.text_2 {
-
color: #020202;
-
font-size: 20px;
-
font-family: 'PingFang SC';
-
line-height: 28px;
-
text-align: center;
-
}
-
.text-wrapper {
-
margin-top: 42px;
-
padding-bottom: 12px;
-
/* border-bottom: solid 1px #888888; */
-
}
-
.font_1 {
-
width: 100%;
-
font-size: 15px;
-
font-family: 'PingFang SC';
-
line-height: 21px;
-
color: #00000;
-
}
-
.text-wrapper_2 {
-
padding: 20px 0 12px;
-
/* border-bottom: solid 1px #888888; */
-
}
-
.text_3 {
-
margin-top: 22px;
-
color: #166bf8;
-
}
-
/* 登錄按鈕1 */
-
.button button {
-
margin-top: 324px;
-
padding: 8px 0 11px;
-
/* background-color: #166bf880; */
-
background-image: url('。。。。。。。。。。。。。。。。。。。。');
-
background-size: 100% 100%;
-
background-repeat: no-repeat;
-
border-radius: 5px;
-
width: 100%;
-
}
-
.text_4 {
-
color: #ffffff;
-
}
-
.group_2 {
-
padding: 50px 62px;
-
}
-
.group_3 {
-
padding: 50px 42%;
-
}
-
.font_2 {
-
font-size: 12px;
-
font-family: 'PingFang SC';
-
line-height: 17px;
-
color: #555555;
-
}
-
/* 登錄按鈕2*/
-
.button2 button{
-
width: 100%;
-
margin-top: 324px;
-
padding: 8px 0 11px;
-
background-color: #166bf880;
-
border-radius: 5px;
-
line-height: 21px;
-
font-size: 15px;
-
}
-
.text_66 {
-
color: #ffffff;
-
}
點擊登錄頁面上的短信驗證碼登錄后跳轉到此頁,跳轉方法會用到uni.navigateTo方法在登錄頁面看代碼自行理解吧↑↑↑↑↑↑↑↑↑↑↑
跳轉、返回的方法參考文檔:
注意??!添加新頁面的時候上面的↑↑↑↑↑↑↑↑↑↑↑pages.json配置文件也需要添加對應的頁面配置才行不然頁面出不來
效果圖:
-
<!-- 手機驗證找回密碼 -->
-
<template>
-
<view class="flex-col flex-auto group">
-
<text class="self-center text_2">手機號+短信驗證碼登錄</text>
-
<view class="flex-col group_2 space-y-10">
-
<input type="number" class="self-start font_1" @input="onInput" placeholder="請輸入手機號碼" v-model="phoneNumber">
-
<!-- svg畫線 -->
-
<view style="height: 1px;">
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
-
<line x1="0" y1="0" x2="400" y2="0" style="stroke:rgb(0,0,0);stroke-width:0.2" />
-
</svg>
-
</view>
-
-
<view class="flex-row justify-between group_3">
-
<input type="number" class="self-start font_1 text_4" maxlength="6" @input="onInput" placeholder="請輸入驗證碼" v-model="code">
-
<view class="flex-col justify-start items-center self-center text-wrapper">
-
<!-- <text class="font_1 text_3" @click="onSetCode()">獲取驗證碼</text> -->
-
<text v-bind:class="{acquire:isGrey,again:!isGrey}"
-
v-bind:disabled="dis" type="primary"
-
@click="onSetCode">
-
<span v-if="show">獲取驗證碼</span>
-
<span v-else>重新發送({{count}}s)</span>
-
</text>
-
</view>
-
</view>
-
-
<!-- svg畫線 -->
-
<view style="height: 1px;">
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
-
<line x1="0" y1="0" x2="400" y2="0" style="stroke:rgb(0,0,0);stroke-width:0.2" />
-
</svg>
-
</view>
-
</view>
-
<view class="self-start font_1 text_5" @click="onPageJump('/pages/login/login')">用密碼登錄</view>
-
<view class="flex-col justify-start items-center button" v-if="btnShow">
-
<button class="font_1 text_6" @click="onSubmit()">登 錄</button>
-
</view>
-
<!-- 登錄按鈕2 -->
-
<view class="flex-col justify-start items-center button2" v-else>
-
<button class="font_1 text_66">登 錄</button>
-
</view>
-
<text class="self-center text_7" @click="onPageJump('/pages/login/findBack')">找回密碼</text>
-
</view>
-
-
</template>
-
-
<script>
-
export default {
-
components: {
-
-
},
-
data() {
-
return {
-
phoneNumber:'', //手機號驗證
-
code:'', //驗證碼
-
dis: false, //判斷是否禁用狀態
-
show: true, //判斷顯示為發送還是重新發送
-
isGrey: false, //class判斷按鈕樣式
-
timer: null, //設置計時器,
-
count: "", //定義常量
-
num:'', //判斷是否為第一次點擊
-
btnShow:false, //判斷登錄按鈕顯示隱藏
-
timeOut:null, //添加定時器
-
};
-
},
-
// 方法
-
methods: {
-
// 找回密碼跳轉頁面
-
onPageJump(url) {
-
uni.navigateTo({
-
url: url
-
});
-
},
-
-
// 發送驗證碼
-
onSetCode() {
-
let TIME_COUNT = 60;
-
if (!this.timer) {
-
uni.showToast({
-
title: '已發送驗證碼',
-
icon: 'success',
-
});
-
this.count = TIME_COUNT;
-
this.isGrey = true;
-
this.show = false;
-
this.dis = true;
-
this.timer = setInterval(() => {
-
if (this.count > 0 && this.count <= TIME_COUNT) {
-
this.count--;
-
} else {
-
this.dis = false;
-
this.isGrey = false;
-
this.show = true;
-
clearInterval(this.timer);
-
this.timer = null;
-
}
-
}, 1000);
-
}
-
},
-
// 判斷顯示登錄按鈕
-
onInput() {
-
this.timeOut && clearTimeout(this.timeOut)
-
this.timeOut = setTimeout(() => {
-
if (this.phoneNumber && this.code) {
-
this.btnShow = true;
-
} else {
-
this.btnShow = false;
-
}
-
}, 100);
-
},
-
//點擊登錄
-
onSubmit(){
-
// 判斷驗證手機號
-
if(!this.phoneNumber){
-
uni.showToast({
-
title: '請輸入手機號',
-
icon: 'none',
-
});
-
return;
-
}
-
const phoneNumber= /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
-
if(!phoneNumber.test(this.phoneNumber)){
-
uni.showToast({
-
title: '手機號輸入不正確',
-
icon: 'none',
-
});
-
return;
-
}
-
// 判斷驗證碼
-
if(!this.code){
-
uni.showToast({
-
title: '請輸入驗證碼',
-
icon: 'none',
-
});
-
return;
-
}
-
uni.showToast({
-
title: '請稍后...',
-
icon: 'loading',
-
});
-
},
-
-
},
-
};
-
</script>
-
-
<style>
-
@import"../../style/css/phoneVerify.css";
-
/* 驗證碼按鈕樣式 */
-
.acquire{
-
padding: 3px 0px;
-
background-color: #eeeeee;
-
border-radius: 5px;
-
width: 92px;
-
height: 29px;
-
color: #666;
-
font-size: 14px;
-
line-height: 20px;
-
text-align: center;
-
}
-
.again{
-
padding: 3px 0px;
-
background-color: #eeeeee;
-
border-radius: 5px;
-
width: 92px;
-
height: 29px;
-
color: #000000;
-
font-size: 14px;
-
line-height: 20px;
-
text-align: center;
-
}
-
-
</style>
這個頁面因為是靜態的沒有后端接口只是做的樣式,所以驗證碼讀秒這塊內容刷新頁面時會重置重新開始讀秒這里注意一下就行,如果接后端接口實現的話原理也差不多自己慢慢理解就行
大概就長這樣:
至于左上角這個返回鍵的小鈕鈕是uni-app創建項目時自帶的 pages.json配置文件可以配置關閉 用("navigationStyle":"custom")這個參數就能關閉,單頁面關閉在pages里配置,全部關閉在globalStyle里配置。
大概長這樣:
也可以在Vue頁面的方法里用uni.navigateBack方法自己寫一個返回的方法。uni.navigateBack返回頁面的方法具體怎么用↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓后面的頁面會有用到
-
/************************************************************
-
** 全局樣式 **
-
************************************************************/
-
html {
-
font-size: 16px;
-
}
-
-
body {
-
margin: 0;
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
-
'Droid Sans', 'Helvetica Neue', 'Microsoft Yahei', sans-serif;
-
-webkit-font-smoothing: antialiased;
-
-moz-osx-font-smoothing: grayscale;
-
}
-
-
view,
-
image,
-
text {
-
box-sizing: border-box;
-
flex-shrink: 0;
-
}
-
-
#app {
-
width: 100vw;
-
height: 100vh;
-
}
-
-
.flex-row {
-
display: flex;
-
flex-direction: row;
-
}
-
-
.flex-col {
-
display: flex;
-
flex-direction: column;
-
}
-
-
.justify-start {
-
justify-content: flex-start;
-
}
-
-
.justify-end {
-
justify-content: flex-end;
-
}
-
-
.justify-center {
-
justify-content: center;
-
}
-
-
.justify-between {
-
justify-content: space-between;
-
}
-
-
.justify-around {
-
justify-content: space-around;
-
}
-
-
.justify-evenly {
-
justify-content: space-evenly;
-
}
-
-
.items-start {
-
align-items: flex-start;
-
}
-
-
.items-end {
-
align-items: flex-end;
-
}
-
-
.items-center {
-
align-items: center;
-
}
-
-
.items-baseline {
-
align-items: baseline;
-
}
-
-
.items-stretch {
-
align-items: stretch;
-
}
-
-
.self-start {
-
align-self: flex-start;
-
}
-
-
.self-end {
-
align-self: flex-end;
-
}
-
-
.self-center {
-
align-self: center;
-
}
-
-
.self-baseline {
-
align-self: baseline;
-
}
-
-
.self-stretch {
-
align-self: stretch;
-
}
-
-
.flex-1 {
-
flex: 1 1 0%;
-
}
-
-
.flex-auto {
-
flex: 1 1 auto;
-
}
-
-
.grow {
-
flex-grow: 1;
-
}
-
-
.grow-0 {
-
flex-grow: 0;
-
}
-
-
.shrink {
-
flex-shrink: 1;
-
}
-
-
.shrink-0 {
-
flex-shrink: 0;
-
}
-
-
.relative {
-
position: relative;
-
}
-
-
/* ------------------------------------------------ */
-
.group {
-
padding: 30px 40px 60px;
-
overflow-y: auto;
-
}
-
.text_2 {
-
color: #020202;
-
font-size: 20px;
-
font-family: 'PingFang SC';
-
line-height: 28px;
-
}
-
.group_2 {
-
margin-top: 42px;
-
/* border-bottom: solid 1px #888888; */
-
}
-
.space-y-10 > view:not(:first-child),
-
.space-y-10 > text:not(:first-child),
-
.space-y-10 > image:not(:first-child) {
-
margin-top: 10px;
-
}
-
.font_1 {
-
font-size: 15px;
-
font-family: 'PingFang SC';
-
line-height: 21px;
-
color: #000000;
-
}
-
.group_3 {
-
padding: 5px 0;
-
/* border-top: solid 1px #888888; */
-
}
-
.text_4 {
-
margin-top: 8px;
-
}
-
.text-wrapper {
-
padding: 4px 0;
-
background-color: #eeeeee;
-
border-radius: 5px;
-
width: 92px;
-
height: 29px;
-
}
-
.text_3 {
-
color: #000000;
-
font-size: 14px;
-
line-height: 20px;
-
}
-
.text_5 {
-
margin-top: 22px;
-
color: #166bf8;
-
}
-
.button button{
-
margin-top: 324px;
-
padding: 8px 0 11px;
-
/* background-color: #166bf880; */
-
background-image: url('。。。。。。。。。。。。。。。。。。。。。。');
-
background-size: 100% 100%;
-
background-repeat: no-repeat;
-
border-radius: 5px;
-
width: 100%;
-
}
-
.text_6 {
-
color: #ffffff;
-
}
-
.text_7 {
-
margin-top: 50px;
-
color: #555555;
-
font-size: 12px;
-
font-family: 'PingFang SC';
-
line-height: 17px;
-
}
-
/* 登錄按鈕2*/
-
.button2 button{
-
width: 100%;
-
margin-top: 324px;
-
padding: 8px 0 11px;
-
background-color: #166bf880;
-
border-radius: 5px;
-
line-height: 21px;
-
font-size: 15px;
-
}
-
.text_66 {
-
color: #ffffff;
-
}
在登錄頁面點擊找回密碼后跳轉到此頁面
同樣在pages.json文件里配置對應頁面參數↑↑↑↑↑↑↑↑↑
效果圖:
點擊通過手機號跳轉到手機短信驗證頁面 也就是第四步的頁面點擊通過郵箱驗證跳轉到郵箱驗證頁面 也就是第六步的頁面
-
<!-- 找回密碼 -->
-
<template>
-
<view class="flex-col justify-start flex-auto group_3">
-
<view class="flex-col section">
-
<view class="flex-row justify-between items-center group_4" @click="onPageJump('/pages/login/phoneVerify')">
-
<text class="font_1">通過已綁定手機號,用短信驗證登錄</text>
-
<image
-
class="image_5"
-
src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/637d8bf95a7e3f031010c80e/63e351ec66570000128a304a/16758423632990405565.png"
-
/>
-
</view>
-
<view class="flex-row justify-between items-center group_4" @click="onPageJump('/pages/login/mailFindBack')">
-
<text class="font_1">通過已綁定郵箱重設密碼</text>
-
<image
-
class="image_5"
-
src="。。。。。。。。。。。。。。。"
-
/>
-
</view>
-
</view>
-
</view>
-
</template>
-
-
<script>
-
export default {
-
components: {},
-
data() {
-
return {
-
-
};
-
-
},
-
-
methods: {
-
onPageJump(url) {
-
uni.navigateTo({
-
url:url
-
})
-
},
-
},
-
};
-
</script>
-
-
<style>
-
@import"../../style/css/findBack.css";
-
</style>
-
/************************************************************
-
** 全局樣式 **
-
************************************************************/
-
html {
-
font-size: 16px;
-
}
-
-
body {
-
margin: 0;
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
-
'Droid Sans', 'Helvetica Neue', 'Microsoft Yahei', sans-serif;
-
-webkit-font-smoothing: antialiased;
-
-moz-osx-font-smoothing: grayscale;
-
}
-
-
view,
-
image,
-
text {
-
box-sizing: border-box;
-
flex-shrink: 0;
-
}
-
-
#app {
-
width: 100vw;
-
height: 100vh;
-
}
-
-
.flex-row {
-
display: flex;
-
flex-direction: row;
-
}
-
-
.flex-col {
-
display: flex;
-
flex-direction: column;
-
}
-
-
.justify-start {
-
justify-content: flex-start;
-
}
-
-
.justify-end {
-
justify-content: flex-end;
-
}
-
-
.justify-center {
-
justify-content: center;
-
}
-
-
.justify-between {
-
justify-content: space-between;
-
}
-
-
.justify-around {
-
justify-content: space-around;
-
}
-
-
.justify-evenly {
-
justify-content: space-evenly;
-
}
-
-
.items-start {
-
align-items: flex-start;
-
}
-
-
.items-end {
-
align-items: flex-end;
-
}
-
-
.items-center {
-
align-items: center;
-
}
-
-
.items-baseline {
-
align-items: baseline;
-
}
-
-
.items-stretch {
-
align-items: stretch;
-
}
-
-
.self-start {
-
align-self: flex-start;
-
}
-
-
.self-end {
-
align-self: flex-end;
-
}
-
-
.self-center {
-
align-self: center;
-
}
-
-
.self-baseline {
-
align-self: baseline;
-
}
-
-
.self-stretch {
-
align-self: stretch;
-
}
-
-
.flex-1 {
-
flex: 1 1 0%;
-
}
-
-
.flex-auto {
-
flex: 1 1 auto;
-
}
-
-
.grow {
-
flex-grow: 1;
-
}
-
-
.grow-0 {
-
flex-grow: 0;
-
}
-
-
.shrink {
-
flex-shrink: 1;
-
}
-
-
.shrink-0 {
-
flex-shrink: 0;
-
}
-
-
.relative {
-
position: relative;
-
}
-
-
.font_1 {
-
font-size: 16px;
-
font-family: 'PingFang SC';
-
line-height: 22px;
-
color: #020202;
-
}
-
.group_3 {
-
padding: 10px 0 586px;
-
overflow-y: auto;
-
}
-
.section {
-
padding: 0px 16px;
-
background-color: #ffffff;
-
}
-
.group_4 {
-
padding: 18px 0;
-
border-bottom: solid 1px #979797;
-
}
-
.image_5 {
-
margin-right: 14px;
-
width: 12px;
-
height: 12px;
-
}
效果圖:
-
<!-- 郵件找回密碼 -->
-
<template>
-
<view class="flex-col flex-auto group">
-
<text class="self-center text_2">通過郵箱找回密碼</text>
-
<input type="text" class="self-start font_1 text_3" @input="onInput" placeholder="請輸入您綁定的郵箱地址" v-model="email">
-
<!-- svg畫線 -->
-
<view style="height: 1px;">
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
-
<line x1="0" y1="0" x2="400" y2="0" style="stroke:rgb(0,0,0);stroke-width:0.2" />
-
</svg>
-
</view>
-
-
<view class="flex-col justify-start items-center button" v-if="btnShow">
-
<text class="font_1 text_4" @click="onSubmit()">下一步</text>
-
</view>
-
<!-- 下一步按鈕2 -->
-
<view class="flex-col justify-start items-center button2" v-else>
-
<button class="font_1 text_66">下一步</button>
-
</view>
-
</view>
-
</template>
-
-
<script>
-
export default {
-
components: {
-
-
},
-
data() {
-
return {
-
email:'', //郵箱
-
btnShow:false, //判斷登錄按鈕顯示隱藏
-
timeOut:null, //添加定時器
-
};
-
},
-
-
methods: {
-
// 判斷顯示下一步按鈕
-
onInput() {
-
this.timeOut && clearTimeout(this.timeOut)
-
this.timeOut = setTimeout(() => {
-
if (this.email) {
-
this.btnShow = true;
-
} else {
-
this.btnShow = false;
-
}
-
}, 100);
-
},
-
// 點擊下一步
-
onSubmit(){
-
if(!this.email){
-
uni.showToast({
-
title: '請輸入郵箱',
-
icon: 'none',
-
});
-
return;
-
}
-
const email= /^\w{3,}@\w{2,}\.(com|cn|net|com\.cn)$/;
-
if(!email.test(this.email)){
-
uni.showToast({
-
title: '郵箱輸入不正確',
-
icon: 'none',
-
});
-
return;
-
}
-
uni.showToast({
-
title: '請稍后...',
-
icon: 'loading',
-
-
});
-
// 添加定時器延時跳轉頁面
-
setTimeout(function(){
-
uni.navigateTo({
-
url: '/pages/login/emailFinish'
-
});
-
},2000)
-
-
}
-
},
-
};
-
</script>
-
-
<style>
-
@import"../../style/css/mailFindBack.css";
-
</style>
-
/************************************************************
-
** 全局樣式 **
-
************************************************************/
-
-
html {
-
font-size: 16px;
-
}
-
-
body {
-
margin: 0;
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
-
'Droid Sans', 'Helvetica Neue', 'Microsoft Yahei', sans-serif;
-
-webkit-font-smoothing: antialiased;
-
-moz-osx-font-smoothing: grayscale;
-
}
-
-
view,
-
image,
-
text {
-
box-sizing: border-box;
-
flex-shrink: 0;
-
}
-
-
#app {
-
width: 100vw;
-
height: 100vh;
-
}
-
-
.flex-row {
-
display: flex;
-
flex-direction: row;
-
}
-
-
.flex-col {
-
display: flex;
-
flex-direction: column;
-
}
-
-
.justify-start {
-
justify-content: flex-start;
-
}
-
-
.justify-end {
-
justify-content: flex-end;
-
}
-
-
.justify-center {
-
justify-content: center;
-
}
-
-
.justify-between {
-
justify-content: space-between;
-
}
-
-
.justify-around {
-
justify-content: space-around;
-
}
-
-
.justify-evenly {
-
justify-content: space-evenly;
-
}
-
-
.items-start {
-
align-items: flex-start;
-
}
-
-
.items-end {
-
align-items: flex-end;
-
}
-
-
.items-center {
-
align-items: center;
-
}
-
-
.items-baseline {
-
align-items: baseline;
-
}
-
-
.items-stretch {
-
align-items: stretch;
-
}
-
-
.self-start {
-
align-self: flex-start;
-
}
-
-
.self-end {
-
align-self: flex-end;
-
}
-
-
.self-center {
-
align-self: center;
-
}
-
-
.self-baseline {
-
align-self: baseline;
-
}
-
-
.self-stretch {
-
align-self: stretch;
-
}
-
-
.flex-1 {
-
flex: 1 1 0%;
-
}
-
-
.flex-auto {
-
flex: 1 1 auto;
-
}
-
-
.grow {
-
flex-grow: 1;
-
}
-
-
.grow-0 {
-
flex-grow: 0;
-
}
-
-
.shrink {
-
flex-shrink: 1;
-
}
-
-
.shrink-0 {
-
flex-shrink: 0;
-
}
-
-
.relative {
-
position: relative;
-
}
-
/* ------------------------------------------------------------------------------ */
-
-
.group {
-
padding: 25px 40px 127px;
-
overflow-y: auto;
-
}
-
.text_2 {
-
color: #020202;
-
font-size: 20px;
-
font-family: 'PingFang SC';
-
line-height: 28px;
-
}
-
.font_1 {
-
font-size: 15px;
-
font-family: 'PingFang SC';
-
line-height: 21px;
-
}
-
.text_3 {
-
margin-top: 42px;
-
margin-bottom: 12px;
-
color: #999999;
-
}
-
/* .section {
-
margin-top: 12px;
-
background-color: #888888;
-
height: 1px;
-
} */
-
.button {
-
margin-top: 324px;
-
padding: 8px 0 11px;
-
/* background-color: #166bf880; */
-
background-image: url('。。。。。。。。。。。。');
-
background-size: 100% 100%;
-
background-repeat: no-repeat;
-
border-radius: 5px;
-
}
-
.text_4 {
-
color: #ffffff;
-
}
-
/* 下一步按鈕2*/
-
.button2 button{
-
width: 100%;
-
margin-top: 324px;
-
padding: 8px 0 11px;
-
background-color: #166bf880;
-
border-radius: 5px;
-
line-height: 21px;
-
font-size: 15px;
-
}
-
.text_66 {
-
color: #ffffff;
-
}
效果圖:
-
<template>
-
<view class="flex-col flex-auto group">
-
<view class="flex-col group_2">
-
<image
-
class="self-center image_5"
-
src="。。。。。。。。。。。。。。"
-
/>
-
<text class="self-center text_2">請訪問郵件中給出的網頁鏈接地址,根據頁面提示完成密碼重設。</text>
-
<view class="flex-col justify-start items-center button">
-
<button class="text_3" @click="Back">確定</button>
-
</view>
-
</view>
-
</view>
-
</template>
-
-
<script>
-
export default {
-
components: {
-
-
},
-
data() {
-
return {
-
-
};
-
},
-
-
methods: {
-
// 點擊確定返回上一頁
-
Back(){
-
// 返回到上一個頁面
-
uni.navigateBack({
-
delta:1,//返回層數,2則上上頁,默認delta:1
-
})
-
},
-
},
-
};
-
-
</script>
-
-
<style>
-
@import"../../style/css/emailFinish.css";
-
</style>
點擊返回上一頁面可以用uni.navigateBack方法
點擊跳轉到指定頁面可以用uni.navigateTo方法(因為都屬于跳轉頁面也可以用這個方法返回上一頁自行理解吧)
大概長這樣:
-
/************************************************************
-
** 全局樣式 **
-
************************************************************/
-
-
html {
-
font-size: 16px;
-
}
-
-
body {
-
margin: 0;
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
-
'Droid Sans', 'Helvetica Neue', 'Microsoft Yahei', sans-serif;
-
-webkit-font-smoothing: antialiased;
-
-moz-osx-font-smoothing: grayscale;
-
}
-
-
view,
-
image,
-
text {
-
box-sizing: border-box;
-
flex-shrink: 0;
-
}
-
-
#app {
-
width: 100vw;
-
height: 100vh;
-
}
-
-
.flex-row {
-
display: flex;
-
flex-direction: row;
-
}
-
-
.flex-col {
-
display: flex;
-
flex-direction: column;
-
}
-
-
.justify-start {
-
justify-content: flex-start;
-
}
-
-
.justify-end {
-
justify-content: flex-end;
-
}
-
-
.justify-center {
-
justify-content: center;
-
}
-
-
.justify-between {
-
justify-content: space-between;
-
}
-
-
.justify-around {
-
justify-content: space-around;
-
}
-
-
.justify-evenly {
-
justify-content: space-evenly;
-
}
-
-
.items-start {
-
align-items: flex-start;
-
}
-
-
.items-end {
-
align-items: flex-end;
-
}
-
-
.items-center {
-
align-items: center;
-
}
-
-
.items-baseline {
-
align-items: baseline;
-
}
-
-
.items-stretch {
-
align-items: stretch;
-
}
-
-
.self-start {
-
align-self: flex-start;
-
}
-
-
.self-end {
-
align-self: flex-end;
-
}
-
-
.self-center {
-
align-self: center;
-
}
-
-
.self-baseline {
-
align-self: baseline;
-
}
-
-
.self-stretch {
-
align-self: stretch;
-
}
-
-
.flex-1 {
-
flex: 1 1 0%;
-
}
-
-
.flex-auto {
-
flex: 1 1 auto;
-
}
-
-
.grow {
-
flex-grow: 1;
-
}
-
-
.grow-0 {
-
flex-grow: 0;
-
}
-
-
.shrink {
-
flex-shrink: 1;
-
}
-
-
.shrink-0 {
-
flex-shrink: 0;
-
}
-
-
.relative {
-
position: relative;
-
}
-
/* ------------------------------------------------------------------------------ */
-
-
.group {
-
padding: 25px 40px 127px;
-
overflow-y: auto;
-
}
-
.text_2 {
-
color: #020202;
-
font-size: 20px;
-
font-family: 'PingFang SC';
-
line-height: 28px;
-
}
-
.font_1 {
-
font-size: 15px;
-
font-family: 'PingFang SC';
-
line-height: 21px;
-
}
-
.text_3 {
-
margin-top: 42px;
-
margin-bottom: 12px;
-
color: #999999;
-
}
-
/* .section {
-
margin-top: 12px;
-
background-color: #888888;
-
height: 1px;
-
} */
-
.button {
-
margin-top: 324px;
-
padding: 8px 0 11px;
-
/* background-color: #166bf880; */
-
background-image: url('。。。。。。。。。。。。。。。');
-
background-size: 100% 100%;
-
background-repeat: no-repeat;
-
border-radius: 5px;
-
}
-
.text_4 {
-
color: #ffffff;
-
}
-
/* 下一步按鈕2*/
-
.button2 button{
-
width: 100%;
-
margin-top: 324px;
-
padding: 8px 0 11px;
-
background-color: #166bf880;
-
border-radius: 5px;
-
line-height: 21px;
-
font-size: 15px;
-
}
-
.text_66 {
-
color: #ffffff;
-
}
本章也是自己參考相關資料和各位大佬的文章自行整理僅供參考,希望可以幫助到和我一樣菜雞的小伙伴
參考資料:
https://blog.csdn.net/weixin_40614372/article/details/101537653
uni-app官網:
https://uniapp.dcloud.net.cn/component/
登錄頁面完成后我用的是Strophe.js對接Openfire的接口,然后把Strophe.js的用法加到↑本文的登錄頁里使用
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~
希望得到建議咨詢、商務合作,也請與我們聯系01063334945。
分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。
藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
作者:藍藍設計 圖片來源:花瓣網
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~
希望得到建議咨詢、商務合作,也請與我們聯系01063334945。
分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。
藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
作者:藍藍設計 圖片來源:花瓣網
藍藍設計建立了UI設計分享群,每天會分享國內外的一些優秀設計,如果有興趣的話,可以進入一起成長學習,請加微信ban_lanlan,報下信息,藍小助會請您入群。歡迎您加入噢~~
希望得到建議咨詢、商務合作,也請與我們聯系01063334945。
分享此文一切功德,皆悉回向給文章原作者及眾讀者. 免責聲明:藍藍設計尊重原作者,文章的版權歸原作者。如涉及版權問題,請及時與我們取得聯系,我們立即更正或刪除。
藍藍設計( www.syprn.cn )是一家專注而深入的界面設計公司,為期望卓越的國內外企業提供卓越的UI界面設計、BS界面設計 、 cs界面設計 、 ipad界面設計 、 包裝設計 、 圖標定制 、 用戶體驗 、交互設計、 網站建設 、平面設計服務、UI設計公司、界面設計公司、UI設計服務公司、數據可視化設計公司、UI交互設計公司、高端網站設計公司、UI咨詢、用戶體驗公司、軟件界面設計公司。
藍藍設計的小編 http://www.syprn.cn