123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391 |
- @import "./var";
- $imageUrl:"../images/";
- $DefaultLinearGradient: linear-gradient(to top,#4e5358,#25282a);
- @mixin responsiveImageWithLinearGradient($filename,$ext:png, $bgPos: center, $linearGradient: $DefaultLinearGradient){
- background: url('#{$imageUrl}#{$filename}.#{$ext}') $bgPos no-repeat, $linearGradient no-repeat;;
- @media
- (-webkit-min-device-pixel-ratio: 1.5),
- (min-resolution: 144dpi){
- background: url('#{$imageUrl}#{$filename}X3.#{$ext}') $bgPos no-repeat, $linearGradient no-repeat;;
- }
- @media
- (-webkit-min-device-pixel-ratio: 2),
- (min-resolution: 192dpi){
- background: url('#{$imageUrl}#{$filename}X3.#{$ext}') $bgPos no-repeat, $linearGradient no-repeat;;
- }
- }
- @mixin responsiveImage($filename,$ext:png){
- background-size:cover;
- background-repeat: no-repeat;
- background-image:url('#{$imageUrl}#{$filename}.#{$ext}');
- @media
- (-webkit-min-device-pixel-ratio: 1.5),
- (min-resolution: 144dpi){
- background-image:url('#{$imageUrl}#{$filename}X3.#{$ext}');
- }
- @media
- (-webkit-min-device-pixel-ratio: 2),
- (min-resolution: 192dpi){
- background-image:url('#{$imageUrl}#{$filename}X3.#{$ext}');
- }
- }
- @mixin bluetryButton(){
- text-align: center;
- font-size:16px;
- cursor: pointer;
- border-radius:22.5px;
- width:160px;
- height:40px;
- line-height: 40px;
- transition: 0.3s;
- background: #338fe6 linear-gradient(to bottom, #107ee5, #336ae6);
- &:hover{
- background-image: linear-gradient(to top, #107ee5, #336ae6);
- }
- &:active{
- background-image: linear-gradient(to top, #107ee5, #336ae6);
- }
- }
- @mixin pbCenter(){
- position: absolute;
- top:0;
- bottom: 0;
- left:0;
- right:0;
- margin: auto;
- }
- @mixin no-select{
- -moz-user-select: none;
- -webkit-user-select: none;
- -o-user-select:none;
- }
- @mixin simpleBlueTryButton($concatClass){
- @include pbCenter;
- border-radius: 3px;
- background-color: $dark-blue;
- text-align: center;
- color: white;
- font-size: 14px;
- cursor: pointer;
- &.#{$concatClass}{
- border: 1px solid $dark-blue;
- background: white;
- color: $dark-blue;
- }
- &:hover {
- opacity: 0.8;
- }
- }
- @mixin beforeIcon($iconPath, $offset: 0, $iconSize: 22px, $margin: 8px) {
- &:before {
- content: '';
- display: inline-block;
- width: $iconSize;
- height: $iconSize;
- margin-right: $margin;
- position: relative;
- top: $offset;
- vertical-align: middle;
- @include responsiveImage($iconPath)
- }
- }
- @mixin absoluteBeforeIcon($iconPath, $offsetTop: 0, $offsetLeft: 0, $iconSize: 18px) {
- &:before {
- content: '';
- display: inline-block;
- width: $iconSize;
- height: $iconSize;
- position: absolute;
- top: $offsetTop;
- left: $offsetLeft;
- vertical-align: middle;
- @include responsiveImage($iconPath)
- }
- }
- // 验证手机号 输入框以及按钮样式
- @mixin inputAndBtnInPhoneVerificationForm {
- $input-width: 100%;
- .send-verification-code{
- @include no-select;
- width: 100px;
- height: 34px;
- line-height: 34px;
- border-radius: 2px;
- border: solid 1px $dark-blue;
- margin-top: 5px;
- margin-left: 3%;
- text-align: center;
- display: inline-block;
- vertical-align: top;
- cursor: pointer;
- color: $dark-blue;
- transition: 0.3s;
- font-size:14px;
- &:hover,&:active{
- color: $light-blue;
- border-color: $light-blue;
- }
- &.sended-verification-code{
- cursor: not-allowed;
- color: rgba(#25282a,0.3);
- border-color: rgba(#25282a, 0.3);
- &:hover,&:active{
- cursor: not-allowed;
- color: rgba(#25282a,0.3);
- border-color: rgba(#25282a, 0.3);
- }
- }
- }
- .normal-button{
- background: $dark-blue;
- color: white;
- width: 430px;
- height:38px;
- transition: background 0.3s;
- cursor: pointer;
- text-align: center;
- line-height: 38px;
- border-radius: 3px;
- margin-top: 20px;
- position: absolute;
- top: 283px;
- &:hover{
- background-color: $light-blue;
- }
- &.normal-button-disable{
- cursor: not-allowed;
- opacity: .5;
- }
- .normal_button_loading_icon_wrapper {
- width: 0;
- transition: width .5s;
- display: inline-block;
- overflow: hidden;
- vertical-align: top;
- margin-right: 5px;
- }
- &.normal-button-loading {
- .normal_button_loading_icon_wrapper {
- width: 20px;
- }
- .normal_button_loading_icon {
- width: 20px;
- height: 20px;
- display: inline-block !important;
- border: 2px solid transparent;
- border-radius: 50%;
- border-bottom-color: #fff;
- animation: spin .5s infinite linear;
- vertical-align: middle;
- margin-top: -4px;
- }
- }
- @keyframes spin {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- }
- .normal-input-title{
- font-size: 14px;
- height: 20px;
- font-weight: 500;
- color: $title-black;
- }
- .normal-input-title.required:after {
- content: '*';
- color: $orange;
- margin-left: 2px;
- }
- .normal-input-component{
- margin-top: 5px;
- width: $input-width;
- margin-bottom: 10px;
- &.sign-up-verification-code{
- position: relative;
- .verification-code-success{
- position: absolute;
- right:10px;
- top:0;
- bottom:0;
- margin: auto;
- width: 16px;
- height: 16px;
- display: none;
- &.verification-code-success-show{
- display: block;
- }
- }
- }
- input {
- border-radius: 3px;
- background: white;
- padding: 0 10px;
- border: 1px solid #b4b9c2;
- font-size: 14px;
- width: 100%;
- transition: 0.2s;
- height: 34px;
- line-height: 34px;
- &:active,&:focus,&:hover{
- border-color: $dark-blue;
- }
- }
- .normal-input-error-area{
- color: $orange;
- font-size: 12px;
- height:0;
- overflow: hidden;
- }
- &.normal-input-error-area-show{
- margin-bottom: 0 !important;
- input{
- border: 1px solid $orange;
- }
- .normal-input-error-area{
- height:21px;
- margin-top: 5px;
- }
- }
- ::-webkit-input-placeholder {
- color: #ced4d9;
- font-weight: 400;
- }
- &.phone-number{
- width: 66%;
- display: inline-block;
- vertical-align: middle;
- }
- }
- }
- @mixin loading($size: 14px) {
- &:after {
- width: $size;
- height: $size;
- display: inline-block !important;
- border: 2px solid transparent;
- border-radius: 50%;
- border-bottom-color: #fff;
- animation: spin .5s infinite linear;
- vertical-align: middle;
- margin: 10px;
- content: "";
- }
- }
- @mixin arrow-icon($color) {
- position: relative;
- top: -2px;
- width: 9px;
- height: 7px;
- display: inline-block;
- margin: auto auto auto 6px;
- transition: transform .3s;
- cursor: pointer;
- .arrow-icon {
- right: 7px;
- top: 7px;
- width: 2px;
- height: 7px;
- background-color: $color;
- transform: rotate(47deg);
- position: absolute;
- &:before {
- content: '';
- width: 2px;
- height: 7px;
- background-color: $color;
- transform: rotate(-98deg);
- display: block;
- position: absolute;
- top: 3px;
- left: -3px;
- }
- }
- &.active{
- transform: rotate(180deg);
- transition: transform .3s;
- .arrow-icon:before,
- .arrow-icon {
- background-color: $color;
- }
- }
- }
- @mixin links-arrow($color:$title-black, $degree-right:-45deg, $degree-left: 90deg) {
- position: relative;
- top: -10px;
- width: 9px;
- height: 7px;
- display: inline-block;
- margin: auto auto auto 6px;
- transition: transform .3s;
- cursor: pointer;
- .arrow-icon {
- right: 2px;
- top: 7px;
- width: 2px;
- height: 7px;
- background-color: $color;
- transform: rotate($degree-right);
- position: absolute;
- border-radius: 2px;
- &:before {
- content: '';
- width: 2px;
- height: 7px;
- background-color: $color;
- transform: rotate($degree-left);
- display: block;
- position: absolute;
- top: 3px;
- left: -3px;
- border-radius: 2px;
- }
- }
- }
- @keyframes spin {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- // keyframes兼容性,调用方法@include keyframes(animationName){}
- @mixin keyframes($animationName) {
- @keyframes #{$animationName} {
- @content;
- }
- // Firefox
- @-moz-keyframes #{$animationName} {
- @content;
- }
- // Safari 和 Chrome
- @-webkit-keyframes #{$animationName} {
- @content;
- }
- // Opera
- @-o-keyframes #{$animationName} {
- @content;
- }
- }
|