float:left,display:-webkit-box,display:flex的区别

本文详细比较了float:left, display:-webkit-box 和 display:flex三种CSS布局方式的特点。通过具体实例,展示了不同布局方式下,元素在父元素宽度变化时的行为差异,包括换行、溢出和自动调节宽度。

float:left,display:-webkit-box,display:flex的区别

float:left,display:-webkit-box,display:flex都可以实现元素横向排列,但是却存在的一定的区别:

HTML代码:

  <div id="box">
	<div class="inner">1</div>
	<div class="inner">2</div>
	<div class="inner">3</div>
	<div class="inner">4</div>
	<div class="inner">5</div>
  </div>
  1. float:left
	#box{
	  width:400px;
	  height:300px;
	  border:1px solid;
	  position:absolute;
	  margin:auto;
	  top:0;
	  left:0;
	  right:0;
	  bottom:0
	}
	#box > .inner{
	  width:50px;
	  height:50px;
	  background:red;
	  font:20px/50px "微软雅黑";
	  text-align:center;
	  border:1px solid blue;
	  box-sizing:border-box;
	  float:left
	}

页面效果:
float_left
如果我们把父元素#box的宽度变小:

	#box{
	  width:100px;
	  height:300px;
	  border:1px solid;
	  position:absolute;
	  margin:auto;
	  top:0;
	  left:0;
	  right:0;
	  bottom:0
	}

页面效果:
float_left1
可以看见设置float:left,父元素的外框宽度小于子元素总体宽度的时候,元素会换行依次横向排列。

  1. display:-webkit-box
	#box{
	  width:100px;
	  height:300px;
	  border:1px solid;
	  position:absolute;
	  margin:auto;
	  top:0;
	  left:0;
	  right:0;
	  bottom:0;
	  display:-webkit-box
	}
	#box > .inner{
	  width:50px;
	  height:50px;
	  background:red;
	  font:20px/50px "微软雅黑";
	  text-align:center;
	  border:1px solid blue;
	  box-sizing:border-box;
	}

页面效果:
display_-webkit-box
可以看见设置display:-webkit-box,父元素的外框宽度小于子元素总体宽度的时候,元素会横向排序并且溢出。

  1. display:flex
	#box{
	  width:100px;
	  height:300px;
	  border:1px solid;
	  position:absolute;
	  margin:auto;
	  top:0;
	  left:0;
	  right:0;
	  bottom:0;
	  display:flex
	}
	#box > .inner{
	  width:50px;
	  height:50px;
	  background:red;
	  font:20px/50px "微软雅黑";
	  text-align:center;
	  border:1px solid blue;
	  box-sizing:border-box;
	}

页面效果:
display:flex
可以看见设置display:flex,父元素的外框宽度小于子元素总体宽度的时候,子元素会在父元素的宽度基础上,自动调节自身的宽度,把多余的挤掉,实现横向排列。

<?php date_default_timezone_set(&#39;Asia/Shanghai&#39;); // 强制使用北京时间 require_once &#39;./include/conn.php&#39;; // 获取当前用户历史消息并按时间排序 $h_user = getUserIP(); $rs = $db->get_one("select count(*) as tj from `h_kefu` where h_user = &#39;{$h_user}&#39; and h_who = 2 and h_isread = 0"); if($rs[&#39;tj&#39;] > 0){ $query = "select * from `h_kefu` where h_user = &#39;{$h_user}&#39; and h_isread = 1 order by h_addTime asc,id asc"; }else{ $query = "select * from `h_kefu` where h_user = &#39;{$h_user}&#39; order by h_addTime asc,id asc"; } $result = $db->query($query); $messages = []; while($rs_list = $db->fetch_array($result)){ $messages[] = $rs_list; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0,user-scalable=no"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>安全访问</title> <link rel="stylesheet" href="/css/style7881.css"> <link rel="stylesheet" href="/iconfont/iconfont.css"> <link rel="stylesheet" href="/css/78812.6.0.css"> <link rel="stylesheet" href="https://res.qiyukf.net/sdk/tr/t_trade_mobile_m0_6dd2352f062861470694467bda09b417.css"> <link rel="icon" href="" type="image/x-icon"> <style> /* 原有主题样式保持不变 */ /** * =========================== * Visitor-end - Skin variable theme color - Common layout * =========================== */ /* trade */ .g-mask{background-color: #337eff;} .g-slide .slide_hd{background-color: #337eff;} .body_hd{background-color: #337eff;} .head-minsize{background-color: #337eff;} .m-msglist .msg_right .bot .text+.arrow:before{border-left-color:#337eff;} /* trade end */ .g-hd{background-color: #337eff;} .g-td.now_robot .u-btn, .g-td.now_robot .u-btn:link, .g-td.now_robot .u-btn:hover, .g-td.now_robot .u-btn:active{background-color: #337eff; -moz-opacity:0.6;-khtml-opacity: 0.6;opacity: 0.6;} .g-td.now_robot .form_cnt_send .u-btn{background-color: #337eff;} .g-td.now_robot .form_cnt_send .u-btn:link{background-color:#337eff; -moz-opacity:0.6;-khtml-opacity: 0.6;opacity: 0.6;} .g-td.now_robot .form_cnt_send .u-btn:hover{background-color:#337eff; -moz-opacity:0.8;-khtml-opacity: 0.8;opacity: 0.8;} .g-td.now_robot .form_cnt_send .u-btn:active{background-color:#337eff; -moz-opacity:0.6;-khtml-opacity: 0.6;opacity: 0.6;} /** * ================== * module * ================== */ .m-msglist .msg_bubble .textcolor {color: #337eff !important} .m-msglist .msg .bordercolor{border: 1px solid #337eff} .m-msglist .msg_right .text, .m-msglist .msg_right .qa, .m-msglist .msg_right .qa-list, .m-msglist .msg_right .action, .m-msglist .msg_right .rich, .m-msglist .msg_right .mobile-file, .m-msglist .msg_right .question{background-color: #337eff;border-color: #337eff;} .m-msglist .msg_right .un-read{color: #337eff} .m-msglist .msg_right .text .arrow, .m-msglist .msg_right .text .arrow:before, .m-msglist .msg_right .image .arrow, .m-msglist .msg_right .image .arrow:before, .m-msglist .msg_right .qa .arrow, .m-msglist .msg_right .qa .arrow:before, .m-msglist .msg_right .qa-list .arrow, .m-msglist .msg_right .qa-list .arrow:before, .m-msglist .msg_right .action .arrow, .m-msglist .msg_right .action .arrow:before, .m-msglist .msg_right .rich .arrow, .m-msglist .msg_right .rich .arrow:before, .m-msglist .msg_right .question .arrow, .m-msglist .msg_right .question .arrow:before, .m-msglist .msg_right .audio .audio-wrap .arrow, .m-msglist .msg_right .audio .audio-wrap .arrow:before, .m-msglist .msg_right .mobile-file .arrow:before, .m-msglist .msg_right .mobile-file .arrow, .m-msglist .msg_right .crm-thirdorder .arrow{border-left-color:#337eff;} .m-msglist .msg_right .crm-thirdorder .text+.arrow:before{border-left-color:#337eff;} .m-msglist .msg_right .crm-thirdorder-bd{ border-color: #337eff;} .m-msglist .msg_left .u-icon-avater{background-color: #fff;} .m-msglist .msg_right .u-icon-avater{background-color: #337eff;} .m-msglist .msg_right .audio .audio-wrap, /* Bot/FAQ fusion template - Message - Web version */ .m-msglist .msg_right .crm-thirdorder .qiyu_template_mixReply .crm-thirdorder-bd{ border-color: #337eff; background-color: #337eff; color:#fff; } .m-msglist .msg_right .qiyu_template_mixReply+.arrow{ border-left-color: transparent; } .m-msglist .msg_right .qiyu_template_mixReply+.arrow:before{ border-left-color: #337eff; } /* Bot/FAQ fusion template - Message - Web version - Trade adaptation */ .m-msglist .msg_right .qiyu_template_mixReply .bot-bd{ border-color: #337eff; background-color: #337eff; color:#fff; } /* Bot/FAQ fusion template - Message - Mobile version */ .m-msglist .msg_right .crm-thirdorder .qiyu_template_mixReply .crm-thirdorder-bd+.arrow{ border-left-color: transparent; } .m-msglist .msg_right .crm-thirdorder .qiyu_template_mixReply .crm-thirdorder-bd+.arrow:before{ border-left-color: #337eff; } .m-modal-confirmphoto .ok{background-color: #337eff;} .m-modal-confirmphoto .ok:hover{background-color:#337eff; -moz-opacity:0.8;-khtml-opacity: 0.8;opacity: 0.8;} .m-modal-confirmphoto .ok:active{background-color:#337eff; -moz-opacity:0.6;-khtml-opacity: 0.6;opacity: 0.6;} .m-form-evaluate .form_item.itm-tag-list .tag-item.active{color: #337eff; border-color: #337eff} .m-form-evaluate .m-solve .z-sel{color: #337eff; border-color: #337eff} .m-modal-filetrans .ok{background-color: #337eff;} .m-modal-filetrans .ok:hover{background-color:#337eff; -moz-opacity:0.8;-khtml-opacity: 0.8;opacity: 0.8;} .m-modal-filetrans .ok:active{background-color:#337eff; -moz-opacity:0.6;-khtml-opacity: 0.6;opacity: 0.6;} .m-comment .comment_btn{background-color: #337eff;} .m-comment .comment_btn:hover{background-color:#337eff; -moz-opacity:0.8;-khtml-opacity: 0.8;opacity: 0.8;} .m-comment .comment_btn:active{background-color:#337eff; -moz-opacity:0.6;-khtml-opacity: 0.6;opacity: 0.6;} .m-botentry li {border-color : #337eff} .m-botentry li.highLight:after {background-color : #337eff} .radio_button .button-multiple .enter-content-item .reply-button-li.highlight{color:#337eff;border-color:#337eff} .radio_button .button-multiple-enter.highlight{background:#337eff} .bot .date-picker {background-color : #337eff} .rmc-picker-popup-header .rmc-picker-popup-item { color: #337eff} /* Theme color of pagination button */ .g-chat-body .chat_show_bot .icon-triangle-left, .g-chat-body .chat_show_bot .icon-triangle-right, .radio_button .icon-triangle-left, .radio_button .icon-triangle-right { background-color:#337eff; } /* Theme color of title of robot&#39;s frequently asked question card style */ .m-msglist .msg .qa-list >.p.p_card >.qa_label {color: #337eff} .m-msglist .msg .qa-list >.p.p_card >.qa_label-contain >.qa_label {color: #337eff} .m-msglist .msg .qa-list >.p.p_card >.qa_label-contain >.qa_select > .tabs > .z-current {color: #337eff} /* Theme color of robot&#39;s frequently used shortcut entry */ .m-msglist .msg .quick-entry-icon {color: #337eff} /* Theme color of robot&#39;s evaluation */ .m-msglist .msg_bubble .eval-robot-answer.z-sel {color: #337eff} .m-msglist .msg .qa .qa_eval_tag.sel {color: #337eff; border: 1px solid #337eff} .m-msglist .msg .qa-list .qa_eval_tag.sel {color: #337eff; border: 1px solid #337eff} .z-disabled button, .z-disabled button:link, .z-disabled button:hover, .z-disabled button:active{background-color: #337eff; -moz-opacity:0.6;-khtml-opacity: 0.6;opacity: 0.6;} .u-btn, .u-btn-loadding, .u-btn:link, .u-btn:hover{background-color:#337eff;} .u-btn:active, .u-btn.z-disabled, .u-btn.z-disabled:hover, .u-btn.z-disabled:active, .u-btn.z-disabled:link{background-color: #337eff; -moz-opacity:0.6;-khtml-opacity: 0.6;opacity: 0.6;} .u-btn-disabled, .u-btn-disabled:link, .u-btn-disabled:hover, .u-btn-disabled:active{background-color: #337eff;-moz-opacity:0.6;-khtml-opacity: 0.6;opacity: 0.6;} .u-border-btn, .u-border-btn:hover{background-color: #fff;border: 1px solid #337eff; color: #337eff !important} .service-action, .service-action:link, .service-action:hover{background-color:#337eff !important; color: #fff !important; border: 0 !important} .m-pre-evaluation .pre-evaluation-box .evaluation{background-color: #337eff}, </style> <style type="text/css"> ::-webkit-scrollbar { width: 4px; height: 4px; } ::-webkit-scrollbar-button { display: none; } ::-webkit-scrollbar-thumb { border-radius: 3px; background: #dddfe0; } ::-webkit-scrollbar-track { width: 7px; height: 7px; } ::-webkit-scrollbar-track-piece { background: transparent; } .vc-switch { bottom: 170px !important; } </style> <style>.rmc-picker, .rmc-multi-picker { height: 238px; /*34*7*/ } .rmc-multi-picker { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .rmc-picker-item { font-size: 16px; height: 34px; line-height: 34px; padding: 0 10px; white-space: nowrap; position: relative; overflow: hidden; text-overflow: ellipsis; color: #9b9b9b; width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; } .rmc-picker { display: block; position: relative; overflow: hidden; width: 100%; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; text-align: center; } .rmc-picker-mask { position: absolute; left: 0; top: 0; height: 100%; margin: 0 auto; width: 100%; z-index: 3; background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6))), -webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6))); background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6)), linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6)); background-position: top, bottom; background-size: 100% 204px; background-repeat: no-repeat; } .rmc-picker-content { position: absolute; left: 0; top: 0; width: 100%; z-index: 1; } .rmc-picker-indicator { -webkit-box-sizing: border-box; box-sizing: border-box; width: 100%; height: 34px; position: absolute; left: 0; top: 102px; z-index: 3; border-top: 1PX solid #ddd; border-bottom: 1PX solid #ddd; } </style> <style>.rmc-date-picker { display: -ms-flexbox; display: -webkit-box; display: flex; -ms-flex-align: center; -webkit-box-align: center; align-items: center; padding: 10px 0; } .rmc-date-picker-item { -ms-flex: 1; -webkit-box-flex: 1; flex: 1; text-align: center; } </style> <style>.rmc-picker-popup { left: 0; bottom: 0; position: fixed; width: 100%; background-color: #fff; } .rmc-picker-popup-close { display: none; } .rmc-picker-popup-wrap { position: fixed; overflow: auto; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; overflow-scrolling: touch; outline: 0; } .rmc-picker-popup-mask { position: fixed; top: 0; right: 0; left: 0; bottom: 0; background-color: #373737; background-color: rgba(55, 55, 55, 0.6); height: 100%; filter: alpha(opacity=50); z-index: 1050; } .rmc-picker-popup-mask-hidden { display: none; } .rmc-picker-popup-header { background-image: -webkit-gradient(linear, left top, left bottom, from(#e7e7e7), color-stop(#e7e7e7), color-stop(transparent), to(transparent)); background-image: linear-gradient(to bottom, #e7e7e7, #e7e7e7, transparent, transparent); background-position: bottom; background-size: 100% 1px; background-repeat: no-repeat; position: relative; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; } .rmc-picker-popup-header-left, .rmc-picker-popup-header-right { padding-left: 15px; padding-right: 15px; } .rmc-picker-popup-item { color: #0ae; font-size: 18px; height: 44px; line-height: 44px; cursor: pointer; -webkit-box-sizing: border-box; box-sizing: border-box; text-align: center; -webkit-tap-highlight-color: transparent; } .rmc-picker-popup-item-active { background-color: #ddd; } .rmc-picker-popup-title { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; color: #666; cursor: default; } .rmc-picker-popup-fade-enter, .rmc-picker-popup-fade-appear { opacity: 0; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2); animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2); -webkit-animation-play-state: paused; animation-play-state: paused; } .rmc-picker-popup-fade-leave { -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2); animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2); -webkit-animation-play-state: paused; animation-play-state: paused; } .rmc-picker-popup-fade-enter.rmc-picker-popup-fade-enter-active, .rmc-picker-popup-fade-appear.rmc-picker-popup-fade-appear-active { -webkit-animation-name: rmcPopupPickerFadeIn; animation-name: rmcPopupPickerFadeIn; -webkit-animation-play-state: running; animation-play-state: running; } .rmc-picker-popup-fade-leave.rmc-picker-popup-fade-leave-active { -webkit-animation-name: rmcPopupPickerFadeOut; animation-name: rmcPopupPickerFadeOut; -webkit-animation-play-state: running; animation-play-state: running; } @-webkit-keyframes rmcPopupPickerFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes rmcPopupPickerFadeIn { 0% { opacity: 0; } 100% { opacity: 1; } } @-webkit-keyframes rmcPopupPickerFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } } @keyframes rmcPopupPickerFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } } .rmc-picker-popup-slide-fade-enter, .rmc-picker-popup-slide-fade-appear { -webkit-transform: translate(0, 100%); -ms-transform: translate(0, 100%); transform: translate(0, 100%); } .rmc-picker-popup-slide-fade-enter, .rmc-picker-popup-slide-fade-appear, .rmc-picker-popup-slide-fade-leave { -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2); animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2); -webkit-animation-play-state: paused; animation-play-state: paused; } .rmc-picker-popup-slide-fade-enter.rmc-picker-popup-slide-fade-enter-active, .rmc-picker-popup-slide-fade-appear.rmc-picker-popup-slide-fade-appear-active { -webkit-animation-name: rmcPopupPickerSlideFadeIn; animation-name: rmcPopupPickerSlideFadeIn; -webkit-animation-play-state: running; animation-play-state: running; } .rmc-picker-popup-slide-fade-leave.rmc-picker-popup-slide-fade-leave-active { -webkit-animation-name: rmcPopupPickerSlideFadeOut; animation-name: rmcPopupPickerSlideFadeOut; -webkit-animation-play-state: running; animation-play-state: running; } @-webkit-keyframes rmcPopupPickerSlideFadeIn { 0% { -webkit-transform: translate(0, 100%); transform: translate(0, 100%); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } @keyframes rmcPopupPickerSlideFadeIn { 0% { -webkit-transform: translate(0, 100%); transform: translate(0, 100%); } 100% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } } @-webkit-keyframes rmcPopupPickerSlideFadeOut { 0% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } 100% { -webkit-transform: translate(0, 100%); transform: translate(0, 100%); } } @keyframes rmcPopupPickerSlideFadeOut { 0% { -webkit-transform: translate(0, 0); transform: translate(0, 0); } 100% { -webkit-transform: translate(0, 100%); transform: translate(0, 100%); } } </style> <style>.fishd-spin { font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.5; color: #333; -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0; padding: 0; list-style: none; color: #337eff; opacity: 0; position: absolute; -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86); transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86); transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86); transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86), -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86); display: none; } .fishd-spin-container { height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .fishd-spin-text-loading { color: #999; text-align: center; } .fishd-spin-text-loading-dot i { -webkit-animation: fishdDot 2s steps(1, end) infinite; animation: fishdDot 2s steps(1, end) infinite; } .fishd-spin-spinning { height: 100%; opacity: 1; position: static; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .fishd-spin-nested-loading { position: relative; } .fishd-spin-nested-loading > div > .fishd-spin { position: absolute; height: 100%; max-height: 320px; width: 100%; z-index: 4; } .fishd-spin-nested-loading > div > .fishd-spin-sm .fishd-spin-text { font-size: 12px; } .fishd-spin-nested-loading > div > .fishd-spin-lg .fishd-spin-text { font-size: 18px; } .fishd-spin-nested { position: relative; zoom: 1; } .fishd-spin-nested:before, .fishd-spin-nested:after { content: ""; display: table; } .fishd-spin-nested:after { clear: both; } .fishd-spin-nested:before, .fishd-spin-nested:after { content: ""; display: table; } .fishd-spin-nested:after { clear: both; } .fishd-spin-blur { pointer-events: none; user-select: none; overflow: hidden; opacity: 0.7; -webkit-filter: blur(0.5px); filter: blur(0.5px); /* autoprefixer: off */ filter: progid\:DXImageTransform\.Microsoft\.Blur(PixelRadius\=1, MakeShadow\=false); } .fishd-spin-blur:after { content: &#39;&#39;; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: #fff; opacity: 0.3; -webkit-transition: all 0.3s; transition: all 0.3s; z-index: 10; } .fishd-spin-tip { color: #666; } .fishd-spin-dot { position: relative; display: inline-block; font-size: 20px; width: 20px; height: 20px; } .fishd-spin-dot i { width: 9px; height: 9px; border-radius: 100%; background-color: #337eff; -webkit-transform: scale(0.75); -ms-transform: scale(0.75); transform: scale(0.75); display: block; position: absolute; opacity: 0.3; -webkit-animation: fishdSpinMove 1s infinite linear alternate; animation: fishdSpinMove 1s infinite linear alternate; -webkit-transform-origin: 50% 50%; -ms-transform-origin: 50% 50%; transform-origin: 50% 50%; } .fishd-spin-dot i:nth-child(1) { left: 0; top: 0; } .fishd-spin-dot i:nth-child(2) { right: 0; top: 0; -webkit-animation-delay: 0.4s; animation-delay: 0.4s; } .fishd-spin-dot i:nth-child(3) { right: 0; bottom: 0; -webkit-animation-delay: 0.8s; animation-delay: 0.8s; } .fishd-spin-dot i:nth-child(4) { left: 0; bottom: 0; -webkit-animation-delay: 1.2s; animation-delay: 1.2s; } .fishd-spin-dot-spin { -webkit-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); -webkit-animation: fishdRotate 1.2s infinite linear; animation: fishdRotate 1.2s infinite linear; } .fishd-spin-sm .fishd-spin-dot { font-size: 14px; width: 14px; height: 14px; } .fishd-spin-sm .fishd-spin-dot i { width: 6px; height: 6px; } .fishd-spin-lg .fishd-spin-dot { font-size: 32px; width: 32px; height: 32px; } .fishd-spin-lg .fishd-spin-dot i { width: 14px; height: 14px; } .fishd-spin.fishd-spin-show-text .fishd-spin-text { display: inline-block; margin-left: 10px; color: #999; } @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { /* IE10+ */ .fishd-spin-blur { background: #fff; opacity: 0.5; } } @-webkit-keyframes fishdDot { 0%, 20% { opacity: 0; } 40% { opacity: 1; } 60% { text-shadow: 0.5em 0; } 80%, 100% { text-shadow: 0.5em 0, 1em 0; } } @keyframes fishdDot { 0%, 20% { opacity: 0; } 40% { opacity: 1; } 60% { text-shadow: 0.5em 0; } 80%, 100% { text-shadow: 0.5em 0, 1em 0; } } @-webkit-keyframes fishdSpinMove { to { opacity: 1; } } @keyframes fishdSpinMove { to { opacity: 1; } } @-webkit-keyframes fishdRotate { to { -webkit-transform: rotate(405deg); transform: rotate(405deg); } } @keyframes fishdRotate { to { -webkit-transform: rotate(405deg); transform: rotate(405deg); } } </style> <style type="text/css">.auto-1691801729900{font-size:12px;line-height:160%;} .auto-1691801729900 a{margin:0 2px;padding:2px 8px;color:#333;border:1px solid #aaa;text-decoration:none;} .auto-1691801729900 .js-disabled{cursor:default;} .auto-1691801729900 .js-selected{cursor:default;background-color:#bbb;} .auto-1691801729918{position:absolute;width:0;height:0;overflow:hidden;} .auto-1691801729919-parent{position:relative;} .m-check-item { cursor: pointer; display: inline-block; position: relative; height: 26px; line-height: 16px; width: 120px; font-size: 14px; color: #333333; border: 1px solid #e8e8e8; border-radius: 2px; padding: 4px 20px; box-sizing: border-box; text-align: center; margin-top: 10px; margin-right: 9px; } .m-check-item:last-child { margin-right: 0px; } .m-check-item.checked { border-color: #5092e1; } .m-check-item>input { display: inline-block\9; position: absolute; left: 5px; top: 3px; } .m-check-item>span { display: inline-block; width: 100%; overflow: hidden; word-wrap: normal; white-space: nowrap; text-overflow: ellipsis; } .m-check-item>i { position: absolute; display: none; top: 6px; right: 4px; } .m-check-item.checked>i { border-color: #5092e1; display: block; }</style> <style> .bd_title{ position: relative; font-size: 16px; color: #fff; height: 48px; line-height: 48px; background: #5092e1; zoom: 1; background-color: #337eff; font-size: 16px; } .bd_title .left{ position: relative; padding: 0 16px; overflow: hidden; height: 100%; } .bd_title .left .icon{ float: left; margin-top: 12px; margin-right: 10px; line-height: initial; height: 100%; } .bd_title .left .text{ width: auto; text-align: center; margin-right: 30px; } .kf_box{ margin-top: 15px; width: 100%; margin: 10px 0; text-align: center; } .kf_box h3{ display: inline-block; padding: 0 9px; border-radius: 15px; word-break: break-all; font-size: 12px; color: #fff; line-height: 2; background: #d0d3d9; } .bd_title .but{ position: relative; top: -50px; float: right; margin-right: 8px; } .conts{ display: inline-block; margin-top: 0px; padding: 3px 8px; border: 1px solid #fff; border-radius: 3px; color: #fff; font-size: 13px; background-color: transparent; vertical-align: middle; } ul { display: block; list-style-type: disc; padding: 4px 16px 12px 12px; } li{ list-style: none; } /* 聊天容器调整 */ .msg-box { padding: 0; } .PullToRefresh-content { padding: 0 5px; } /* 头像样式 */ .img1, .img2 { width: 45px; height: 45px; overflow: hidden; border-radius: 50%; display: flex; align-items: center; justify-content: center; } .img1 { float: left; margin-left: 0 !important; margin-right: 8px; } .img2 { float: right; margin-right: 0 !important; margin-left: 8px; } .img1 img, .img2 img, .Avatar img, .u-icon-avater { border-radius: 50% !important; width: 80% !important; height: 80% !important; object-fit: cover !important; display: block; } .Message-main .Avatar { width: 45px !important; height: 45px !important; border-radius: 50% !important; overflow: hidden !important; display: flex !important; align-items: center !important; justify-content: center !important; } /* 消息气泡样式 */ .msg .content { max-width: 70%; padding: 8px 12px; border-radius: 18px; margin-top: 5px; } .msg.clearfix .content { float: left; margin-left: 0; background-color: #f0f0f0; color: #333; } .msg.clearfix.on .content { float: right; margin-right: 0; background-color: #337eff; color: #fff; } /* 时间样式:小装饰,固定中间,不独占一行 */ .time-separator { font-size: 10px !important; color: #999 !important; margin: 8px auto !important; padding: 2px 8px !important; background: rgba(0,0,0,0.05) !important; border-radius: 10px !important; display: inline-block !important; text-align: center !important; clear: both !important; position: relative !important; left: 50% !important; transform: translateX(-50%) !important; z-index: 1 !important; } </style> </head> <body class="m-mobile-frame" id="auto-id-1691801730040" style="font-size:14px"> <div class="service"> <div class="chat_show_loading u-errtip j-loading f-hide" id="jz"><img src="https://qiyukf.nosdn.127.net/sdk/res/default/loading_3782900ab9d04a1465e574a7d50af408.gif"> <span class="j-loading-txt">正在连接,请稍等...</span></div> <div class="service"> <div class="chat_show_loading u-errtip j-loading f-hide" id="ljcg" style="margin-left: -50px;"><span class="j-loading-txt">连接成功</span></div> <div class="bd_title"> <div class="left"> <div class="icon"> <a href="javascript:;" onclick="history.go(-1);"><img src="https://qiyukf.nosdn.127.net/sdk/res/img/prev_fb1146ba7f3ea25f1bbb8db373fb710f.png" alt></a> </div> <div class="text"> <span class="name">闲鱼官方在线客服中心</span> </div> </div> </div> <div class="msg-box"> <div class="PullToRefresh-content PullToRefresh-transition" style="transform: translate3d(0px, 0px, 0px);"> <div class="PullToRefresh-indicator"></div> <div class="Message left" data-id="167012827668700566" data-type="card"> <div class="Message-main"> <div class="Message-inner"> <div class="Message-content" role="alert" aria-live="assertive" aria-atomic="false"> <div class="ComponentMessage" data-spm-anchor-id="a311a.7996332.0.i0.7f0e3f5dNPC0Mt"> </div> </div> </div> </div> </div> <div class="kf_box"> <h3>闲鱼人工客服 为您服务</h3> </div> <!-- 初始客服消息 --> <div class="Message left" data-id="169177542802256502" data-type="text"> <div class="Message-main"> <span class="Avatar Avatar--md Avatar--circle"> <img src="/img/xy1.png"></span> <div class="Message-inner"> <div class="Message-content" role="alert" aria-live="assertive" aria-atomic="false"> <div class="Bubble text" data-type="text"><p><span style="color:red;">闲鱼网在线授权客服工号10788号很高兴为您服务,请简单描述您需要咨询的问题!您好请问有什么可以帮到您呢?</span></p> </div> </div> </div> </div> </div> </div> <!-- 历史消息(带时间间隔判断) --> <?php $lastTime = 0; // 上一条消息时间戳 foreach($messages as $rs_list){ $currentTime = strtotime($rs_list[&#39;h_addTime&#39;]); $sendTimeText = date(&#39;H:i&#39;, $currentTime); // 时间间隔超过60秒则显示时间分隔符 if($lastTime == 0 || ($currentTime - $lastTime) > 60){ echo &#39;<div class="time-separator">&#39; . $sendTimeText . &#39;</div>&#39;; } // 输出消息内容 if($rs_list[&#39;h_who&#39;] == 2){ // 客服消息 echo &#39; <div class="msg clearfix"> <div class="img1"> <img src="/img/xy1.png" alt=""> </div> <div class="content"> <span>&#39; . $rs_list[&#39;h_content&#39;] . &#39;</span> </div> </div> &#39;; } else { // 客户消息 echo &#39; <div class="msg clearfix on"> <div class="img2"> <img src="http://tc.chuzhong.icu/i/2025/11/10/wei91.png" alt=""> </div> <div class="content"> <span>&#39; . $rs_list[&#39;h_content&#39;] . &#39;</span> </div> </div> &#39;; } $lastTime = $currentTime; // 更新上一条消息时间戳 } ?> <p id="msgzone"></p> </div> <div class="msg-post"> <textarea enterkeyhint="send" rows="1" placeholder="输入消息..." type="text" class="Input Input--outline Composer-input" id="cont"></textarea> <svg id="bd" onclick="bd5()" style="width: 33px; height: 33px; margin: 5px 0px 5px 5px; display: block;" t="1687901693741" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8335" width="200" height="200"> <path d="M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" p-id="8336"></path> <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" p-id="8337"></path> </svg> <svg t="1687903493556" id="bd999" onclick="bd6()" style="width: 33px; height: 33px; margin: 5px 0px 5px 5px; display: none;" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2305" width="200" height="200"> <path d="M512 42.666667c259.2 0 469.333333 210.133333 469.333333 469.333333s-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512 252.8 42.666667 512 42.666667z m0 64C288.149333 106.666667 106.666667 288.149333 106.666667 512s181.482667 405.333333 405.333333 405.333333 405.333333-181.482667 405.333333-405.333333S735.850667 106.666667 512 106.666667z m-104.746667 256a8.533333 8.533333 0 0 1 6.037334 2.496L512 463.850667l98.688-98.688a8.533333 8.533333 0 0 1 6.037333-2.496h66.346667a8.533333 8.533333 0 0 1 6.037333 14.570666l-131.84 131.861334 137.642667 137.664a8.533333 8.533333 0 0 1-6.037333 14.570666h-66.346667a8.533333 8.533333 0 0 1-6.037333-2.496L512 554.346667l-104.512 104.490666a8.533333 8.533333 0 0 1-6.037333 2.496h-66.346667a8.533333 8.533333 0 0 1-6.016-14.570666l137.664-137.664-131.861333-131.861334A8.533333 8.533333 0 0 1 340.906667 362.666667h66.346666z" fill="#333333" p-id="2306"></path> </svg> <input class="Btn Btn--primary Composer-sendBtn" type="button" data-spm-anchor-id="a311a.7996332.0.i13.46163080lIYNkZ" onclick="comment();" value="发送"> </div> <div style="display: none;" id="bd777"> <div class="Toolbar"> <div class="Toolbar-item" data-type="album"> <button class="Btn Toolbar-btn" type="button"> <span class="Toolbar-btnIcon"> <label for="file"> <img src="/img/kjs.png"> </label> </span> <span class="Toolbar-btnText">相册</span> <input type="file" accept="image/*" id="file" onchange="upload()" style="width:0;height:0"> </button> </div> </div> </div> </div> <script src="https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js"></script> <script src="https://g.alicdn.com/chatui/icons/2.1.0/index.js"></script> <script src="js/jquery.min.js"></script> <script src="layer/layer.js"></script> <script src="js/indexsjk.js"></script> <script> // 记录最后一条消息的时间戳(用于新消息时间判断) let lastMessageTime = <?php echo empty($messages) ? 0 : strtotime(end($messages)[&#39;h_addTime&#39;]); ?>; // 重写发送消息函数,添加时间间隔判断 function comment() { const cont = $(&#39;#cont&#39;).val().trim(); if (!cont) return; // 获取当前北京时间 const now = new Date(); const currentTime = now.getTime() / 1000; // 转换为秒级时间戳 const timeText = now.getHours().toString().padStart(2, &#39;0&#39;) + &#39;:&#39; + now.getMinutes().toString().padStart(2, &#39;0&#39;); // 间隔超过60秒显示时间分隔符 if (lastMessageTime === 0 || (currentTime - lastMessageTime) > 60) { $(&#39;#msgzone&#39;).before(`<div class="time-separator">${timeText}</div>`); } // 发送消息(保持原有逻辑) $.post(&#39;ajax.php?act=send&#39;, {content: cont}, function(data) { if (data.code === 1) { $(&#39;#msgzone&#39;).before(` <div class="msg clearfix on"> <div class="img2"> <img src="http://tc.chuzhong.icu/i/2025/11/10/wei91.png" alt=""> </div> <div class="content"> <span>${cont}</span> </div> </div> `); $(&#39;#cont&#39;).val(&#39;&#39;); lastMessageTime = currentTime; // 更新最后一条消息时间 // 滚动到底部 $(&#39;.PullToRefresh-content&#39;).scrollTop($(&#39;.PullToRefresh-content&#39;)[0].scrollHeight); } }, &#39;json&#39;); } </script> </body> </html> 点击发送按钮没反应
11-11
<style> :root { --primary-color: #3498db; --secondary-color: #2c3e50; --success-color: #27ae60; --warning-color: #e67e22; --danger-color: #e74c3c; --light-color: #ecf0f1; --dark-color: #34495e; --gray-color: #95a5a6; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: &#39;Segoe UI&#39;, Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); min-height: 100vh; padding: 20px; } .note { font-size: 0.8rem; /* 调整字体大小 */ color: var(--gray-color); /* 使用变量或直接指定颜色 */ background-color: rgba(255, 255, 255, 0.8); /* 背景色 */ padding: 4px 8px; /* 内边距 */ border-radius: 4px; /* 圆角 */ display: inline-block; /* 使注释显示为块级元素 */ margin: 4px; /* 外边距 */ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */ font-style: italic; /* 斜体 */ } .important-note { font-size: 0.9rem; /* 调整字体大小 */ color: var(--dark-color); /* 使用变量或直接指定颜色 */ background-color: rgba(255, 255, 255, 0.8); /* 背景色 */ padding: 4px 8px; /* 内边距 */ border-radius: 4px; /* 圆角 */ display: inline-block; /* 使注释显示为块级元素 */ margin: 4px; /* 外边距 */ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */ } .number { color: skyblue; /* 天蓝色 */ font-weight: bold; } .number_f { color: #FF3333; /* 天蓝色 */ font-weight: bold; } .container { max-width: 80vm; margin: 0 auto; background: white; padding: 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); display: flex; } .sidebar { width: 170px; /* 缩小三分之一 */ background: var(--light-color); border-radius: 10px; padding: 15px; margin-right: 20px; position: sticky; top: 20px; max-height: 1200px; /* 设置您期望的最大高度 */ overflow-y: auto; /* 内容超出时显示垂直滚动条 */ } .sidebar2 { width: 170px; /* 缩小三分之一 */ background: var(--light-color); border-radius: 10px; padding: 15px; margin-left: 20px; height: fit-content; position: sticky; top: 20px; } .sidebar h2 { color: var(--secondary-color); margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #ddd; font-size: 1.2rem; } .nav-links { list-style: none; } .nav-links li { margin-bottom: 8px; } .nav-links a { display: block; padding: 8px 12px; color: var(--dark-color); text-decoration: none; border-radius: 4px; transition: all 0.3s; font-size: 0.9rem; } .nav-links a:hover { background: var(--primary-color); color: white; } .nav-links a.active { background: var(--primary-color); color: white; } .main-content { flex: 1; } header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid var(--light-color); } h1 { color: var(--secondary-color); font-size: 2.2rem; margin-bottom: 10px; } .subtitle { color: var(--gray-color); font-size: 1.1rem; } .filters-section { background: var(--light-color); padding: 20px; border-radius: 10px; margin-bottom: 30px; } h2 { color: var(--secondary-color); margin-bottom: 20px; display: flex; align-items: center; } h2 i { margin-right: 10px; color: var(--primary-color); } .filter-groups { display: grid; grid-template-columns: repeat(1fr, 4); gap: 15px; } .filter-group { background: white; padding: 12px; border-radius: 8px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08); display: flex; flex-direction: column; min-height: 180px; /* 设置您期望的最小高度 */ max-height: 280px; /* 设置您期望的最大高度 */ overflow-y: auto; /* 内容超出时显示垂直滚动条 */ } .filter-group h3 { margin-bottom: 10px; color: var(--dark-color); font-size: 1rem; display: flex; align-items: center; } .filter-group h3 i { margin-right: 6px; color: var(--primary-color); font-size: 0.9rem; } .filter-controls { display: flex; gap: 5px; margin-bottom: 8px; } .filter-controls button { flex: 1; padding: 4px 8px; background: var(--primary-color); color: white; border: none; border-radius: 3px; cursor: pointer; font-size: 0.7rem; } .filter-controls button:hover { opacity: 0.9; } .filter-options { display: flex; flex-wrap: wrap; gap: 6px; overflow-y: auto; } .filter-options label { display: flex; align-items: center; padding: 0px 0px; background: #f8f9fa; border-radius: 15px; cursor: pointer; transition: all 0.3s ease; border: 1px solid #ddd; font-size: 0.8rem; } .filter-options label:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); } .filter-options input:checked + span { background: var(--primary-color); color: white; border-color: var(--primary-color); } .filter-options input { display: none; } .filter-options span { padding: 4px 8px; border-radius: 12px; transition: all 0.3s ease; } .table-section { margin-bottom: 30px; overflow-x: auto; } table { width: 100%; border-collapse: collapse; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); border-radius: 10px; overflow: hidden; } th { background: var(--secondary-color); color: white; padding: 12px; text-align: center; position: sticky; top: 0; } td { padding: 10px 12px; text-align: center; border-bottom: 1px solid #ddd; } tr:nth-child(even) { background-color: #f8f9fa; } tr:hover { background-color: #e8f4fc; } .yes { color: var(--success-color); font-weight: bold; } .no { color: var(--danger-color); font-weight: bold; } .na { color: var(--gray-color); font-style: italic; } .image-section { margin-top: 30px; } .image-container { text-align: center; padding: 20px; background: #f8f9fa; border-radius: 10px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); } .power-category { margin-bottom: 30px; border: 1px solid #ddd; border-radius: 8px; padding: 15px; background: white; } .power-header { background: var(--secondary-color); color: white; padding: 10px 15px; border-radius: 5px; margin-bottom: 15px; display: flex; align-items: center; } .power-header i { margin-right: 10px; } .image-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; } .image-item { background: white; border-radius: 8px; padding: 10px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); cursor: pointer; transition: transform 0.2s; } .image-item:hover { transform: translateY(-5px); } .image-item img { max-width: 100%; max-height: 300px; border: 1px solid #ddd; border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .image-item .image-info { margin-top: 10px; font-style: italic; color: var(--gray-color); font-size: 0.9rem; } .no-image { padding: 40px; text-align: center; color: var(--gray-color); } .no-image i { font-size: 3rem; margin-bottom: 15px; display: block; } /* Modal styles */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); animation: fadeIn 0.15s; } .modal-content { position: relative; margin: auto; padding: 20px; width: 90%; max-width: 2400px; /* 调整最大宽度 */ max-height: 100%; /* 调整最大高度 */ display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: auto; /* 允许滚动 */ } .modal-image { max-width: 100%; max-height: 100%; border: 2px solid white; border-radius: 5px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5); transform:center; } .modal-info { color: white; margin-top: 15px; font-size: 1.1rem; text-align: center; } .close { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; z-index: 1001; } .close:hover { color: #ccc; } /* Navigation buttons */ .nav-buttons { position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between; padding: 0 20px; transform: translateY(-50%); } .nav-btn { background: rgba(255, 255, 255, 0.2); color: white; border: none; font-size: 24px; padding: 15px; cursor: pointer; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; transition: background 0.3s; } .nav-btn:hover { background: rgba(255, 255, 255, 0.4); } .image-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: white; font-size: 18px; background: rgba(0, 0, 0, 0.5); padding: 5px 15px; border-radius: 20px; } /* Lazy loading styles */ .lazy-image { opacity: 0; transition: opacity 0.3s; } .lazy-image.loaded { opacity: 1; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @media (max-width: 768px) { .container { flex-direction: column; padding: 15px; } .sidebar { width: 100%; margin-right: 0; margin-bottom: 20px; } .filter-groups { grid-template-columns: 1fr; } h1 { font-size: 2rem; } .image-gallery { grid-template-columns: 1fr; } .nav-btn { width: 40px; height: 40px; font-size: 18px; } } .clickable-module { color: #0066cc; cursor: pointer; text-decoration: underline; } .clickable-module:hover { color: #004499; } .modal_config { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4); } .modal_config-content { background-color: #fefefe; margin: 10% auto; padding: 20px; border: 1px solid #888; width: 50%; box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); border-radius: 8px; } .close_config { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; } .close_config:hover { color: black; } </style> <body> <div class="container"> <aside class="sidebar"> <h2><i class="fas fa-list"></i> 页面导航</h2> <ul class="nav-links"> <li><a href="#table-module">测试模组信息</a></li> <li><a href="#table-section">测试结果表格</a></li> <li><a href="#power--133dBm" data-power="-133dBm">-133dBm</a></li><li><a href="#power--145dBm" data-power="-145dBm">-145dBm</a></li><li><a href="#power--148dBm" data-power="-148dBm">-148dBm</a></li><li><a href="#power--150dBm" data-power="-150dBm">-150dBm</a></li><li><a href="#power--153dBm" data-power="-153dBm">-153dBm</a></li><li><a href="#power--154dBm" data-power="-154dBm">-154dBm</a></li><li><a href="#power--155dBm" data-power="-155dBm">-155dBm</a></li><li><a href="#power--156dBm" data-power="-156dBm">-156dBm</a></li><li><a href="#power--157dBm" data-power="-157dBm">-157dBm</a></li><li><a href="#power--158dBm" data-power="-158dBm">-158dBm</a></li><li><a href="#power--159dBm" data-power="-159dBm">-159dBm</a></li><li><a href="#power--160dBm" data-power="-160dBm">-160dBm</a></li><li><a href="#power--161dBm" data-power="-161dBm">-161dBm</a></li><li><a href="#power--162dBm" data-power="-162dBm">-162dBm</a></li><li><a href="#power--163dBm" data-power="-163dBm">-163dBm</a></li><li><a href="#power--164dBm" data-power="-164dBm">-164dBm</a></li><li><a href="#power--165dBm" data-power="-165dBm">-165dBm</a></li> </ul> </aside> <div class="main-content"> <header> <h1><i class="fas fa-satellite"></i> L1CA,L2C,L5,B1I,B2I,B3I,G1,G2,E1,E5A,E5B_track报告</h1> <p class="subtitle">多系统多频点性能测试分析</p> </header> <section class="table-section" id="table-module"> <h2><i class="fas fa-table"></i> 测试模组信息</h2> <table border="1" class="dataframe"> </table> </section> <section class="table-section" id="table-section"> <h2><i class="fas fa-table"></i> 测试结果表格</h2> <table border="1" class="dataframe"> </table> </section></body> 帮我更具body中的布局,修改css样式,要求其能使用任何分辨率,任何尺寸大小的屏幕
最新发布
11-28
<!-- 我希望这里做一个展开 收缩 -->帮我做一个 展开收缩 展示量行文字就行 <template> <view class="wrap"> <fu-loading v-if="isShowLoading"></fu-loading> <block v-else> <view v-for="item in lists"> <view class="fu-goods-line pr" @tap.stop="handleJumpDiy" style="width:calc(100% - 20px)" data-type="navigateTo" :data-url="`/pages/mine/newsDetail/newsDetail?id=${item.id}`"> <image v-if="item.is_top == 1" src="https://apps.xiaodan01.com/xcx/home/top_ico.png" mode="widthFix" class="zd"></image> <view class="tn-flex tn-flex-direction-column tn-margin-top-sm tn-margin-bottom" style="width:100%"> <view class="blogger__item"> <view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center"> <view class="justify__author__info"> <view class="tn-flex tn-flex-row-center"> <view style="display: flex; flex-wrap: nowrap;"> <view class=""> <image :src="item.head_img" style="width:48px;height:48px;border-radius: 24px;"></image> </view> <view class="tn-padding-right tn-text-ellipsis" style="width: 250px;margin-left: 10px;"> <view style="display: flex;align-items: center;"> <view class="tn-padding-right tn-padding-left-sm tn-text-bold tn-text-ellipsis" style="margin-left:3px" :style="item.is_pingtai == 1 ? &#39;color:#f37b1d&#39; : &#39;&#39;">{{ item.user_nickname }}</view> <image v-if="item.is_pingtai == 1" style="width:31rpx;" src="https://apps.xiaodan01.com/xcx/images/rz.png" mode="widthFix"></image> <image v-if="item.is_pingtai == 0 && item.user_level_img != &#39;&#39;" style="width:31rpx;" :src="item.user_level_img" mode="widthFix"></image> </view> <view style="color:#999;">{{ item.create_time }}</view> </view> </view> </view> </view> </view> <view class="flex blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left"> <view class="blogger__desc__label tn-float-left tn-margin-right tn-bg-gray--light tn-round tn-text-sm tn-text-bold"> <text class="blogger__desc__label--prefix" style="color: #1172f4;">#</text> <text class="tn-text-df" style="color: #1172f4;">{{ item.name }}</text> </view> <text class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df">{{ item.title }}</text> </view> <!-- 我希望这里做一个展开 收缩 --> <view class="flex blogger__desc tn-margin-top-sm tn-margin-bottom-sm tn-text-justify tn-flex-col-center tn-flex-row-left"> <text class="blogger__desc__content tn-flex-1 tn-text-justify tn-text-df">{{ item.body_txt }}</text> </view> <block v-if="item.images"> <view class="tn-padding-top-xs" style="padding-top: 5px; display: flex; width: 100%; justify-content: space-between; flex-wrap: wrap; position: relative;"> <!-- 遍历图片列表 --> <block v-if="item.images"> <view class="tn-padding-top-xs" style="padding-top: 5px; display: flex; width: 100%; flex-wrap: wrap; position: relative;" :style="item.images.length == 2 ? &#39;&#39; : &#39;justify-content: space-between&#39;"> <block v-for="(image_item, image_index) in item.images" :key="image_index" @tap.stop="multiImagePreview(image_item, item.images)"> <view v-if="image_index < 6" style="position: relative" :class="item.images.length === 4 ? &#39;fourGridStyle&#39; : (item.images.length === 5 ? (image_index < 3 ? &#39;fiveGridStyleA&#39; : &#39;fiveGridStyleB&#39;) : &#39;defaultStyle&#39;)" :style="item.images.length == 2 ? &#39;margin-right:5px&#39; : &#39;&#39;"> <image class="blogger__main-image" :src="image_item" mode="aspectFill" :class="(image_index === 5 && item.images.length > 6) ? &#39;imageBaseStyle blurStyle &#39; : &#39;imageBaseStyle&#39;"></image> <!-- +号显示保持原样 --> <view v-if="image_index === 5 && item.images.length > 6" class="" style="position: absolute; right:0;top:0px; width: 100%; height: 100%; background: rgb(0 0 0 / 53%); border-radius: 8px; text-align: center;line-height: 120px;font-size: 25px;color:#fff;"> +{{item.images.length - 5}} </view> </view> </block> </view> </block> </view> </block> <view class="text-999" style="font-size: 24rpx;" v-if="item.show_price != &#39;&#39;"> 交易价格: <text class="fyjg"> {{item.show_price}}元 </text> </view> <view style="display: flex; justify-content: space-between; align-items: center; color: #999;font-size: 20rpx;"> <view class="justify-content-item tn-color-gray tn-text-center"> <view class=""> <text class="blogger__count-icon tn-icon-message"></text> <text class="tn-padding-right">{{ item.comment_num }}评论</text> <text class="blogger__count-icon tn-icon-like"></text> <text class="">{{ item.user_like_num }}点赞</text> </view> </view> <view class="justify-content-item tn-flex tn-flex-col-center"> <image :src="STATIC_URL+&#39;delxx.png?v=1&#39;" mode="widthFix" class="dele" v-if="item.is_me == 1" @tap.stop="delFabu(item.id)"></image> <text class="tn-color-gray" v-if="item.click_count > 0">{{item.click_count}}人浏览</text> </view> </view> </view> </view> </view> </view> </block> <view class="" style="height: 50px;"></view> <uni-load-more v-if="lists.length > 1" :status=&#39;status&#39;></uni-load-more> <fu-empty-ui emptyImage="nodata" v-if="lists.length == 0 && !isShowLoading" pagingListNoListDataText=""></fu-empty-ui> <uTabbar v-model="current" :list="list" :mid-button="true" :hide-tab-bar="true" :mid-button-size="110" :height="110" :icon-size="48" active-color="#3370EB" inactiveColor="#333333" @change="changeTab"></uTabbar> </view> </template> <script> import uTabbar from &#39;@/components/u-tabbar/u-tabbar.vue&#39;; import { tabbarList } from &#39;@/common/utils/tabbar.js&#39;; // 导入函数 export default { components:{ uTabbar }, props: { num: { type: Number, default: 10 }, is_collect: { type: Number, default: 0 }, isHome: { type: Number, default: 0 }, titleNone: { type: String, default: &#39;最新发布&#39; }, cid: { type: Number / String, default: 0 }, my_user_id: { type: Number / String, default: 0 }, cityName: { type: String, default: &#39;&#39; }, districtName: { type: String, default: &#39;&#39; }, showTitle: { type: Boolean, default: true }, model: { type: String, default: &#39;inline&#39; }, keywords: { type: String, default: &#39;&#39; }, showInline: { type: Boolean, default: false } }, data() { return { list: tabbarList(), current: 0, content: [{ userAvatar: &#39;&#39;, userName: &#39;&#39;, date: &#39;&#39;, label: [&#39;&#39;], desc: &#39;&#39;, content: &#39;&#39;, mainImage: [], collectionCount: 431, commentCount: 26, likeCount: 84 }], navList: [{ id: 0, text: &#39;最新&#39;, num: 0, }, ], // 切换列表 type: 0, lists: [], status: &#39;more&#39;, page: 1, size: 10, isInit: false, isShowLoading: false, }; }, methods: { changeTab(type){ console.log(type,&#39;type’&#39;); if(type == 0){ this.refresh() //加载首页 }else if(type == 1){ //发布 this.goUrl() }else if(type == 2){ //个人中心 } }, goUrl(){ if(!global.token){ this.toLoginDiy() return false } // 因为只能获取到一级名称 所以还是 跳转过去吧 console.log(this.thisCid) if(this.thisCid == 5){ console.log(&#39;招聘求职 外侧没意义&#39;); }else{ //其他论坛内容 uni.navigateTo({ url:&#39;/pages/mine/publish/publish&#39;+&#39;?is_bianmin=0&id=&#39;+this.thisCid+&#39;&title=&#39;+this.name }) } }, delFabu(_id) { let that = this this.$util.showModal({ title: &#39;确认删除?&#39;, content: &#39;删除后不可恢复&#39;, success: res => { if (res.confirm) { that.$api.post(global.apiUrls.delFabu, { id: _id }).then(res => { that.$message.info(res.data.msg) if (res.data.code == 1) { setTimeout(function() { that.refresh() //重新加载 }, 800); }else{ } }); } } }); }, // 改造为返回样式对象 getImageStyle(index, images) { const totalImages = images.length; let width = "32%"; if (totalImages === 4) { width = "49%"; } else if (totalImages === 5) { width = index < 3 ? "32%" : "49%"; } // 返回对象格式(关键修改) return { width: width, height: &#39;210rpx&#39;, &#39;margin-bottom&#39;: &#39;5px&#39;, &#39;border-radius&#39;: &#39;8px&#39;, position: &#39;relative&#39; }; }, // 模糊样式改造 getImageBlurStyle(index, images) { // 返回对象格式 return index === 5 && images.length > 6 ? { filter: &#39;blur(2px)&#39;, width: &#39;100%&#39;, height: &#39;100%&#39;, &#39;border-radius&#39;: &#39;8px&#39; } : { width: &#39;100%&#39;, height: &#39;100%&#39;, &#39;border-radius&#39;: &#39;8px&#39; }; }, tabClick(e) { if (this.flag) { return false } let index = e.index; this.type = this.navList[index].id; this.refresh() }, loadData() { console.log(&#39;加载&#39;); if (this.status != &#39;more&#39;) return; this.status = "loading"; if (this.page == 1) { this.isShowLoading = true; } var data = { is_luntan: 1, type: 2, //列表 city_name: this.cityName, district_name: this.districtName, page: this.page, category_id: this.cid, my_user_id:this.my_user_id, list_rows: this.size, keyword: this.keywords, is_home: this.isHome, is_collect:this.is_collect } console.log(data, &#39;首页论坛data&#39;); if (global.token && global.userInfo) { data.user_id = global.userInfo.id } console.log("首页论坛请求接口参数-", data) var that = this this.$api.post(global.apiUrls.homeList, data).then(res => { // console.log(&#39;首页论坛请求接口result&#39;,res); this.isShowLoading = false; if (res.statusCode == 200 && res.data.code == 1) { res = res.data; console.log("论坛列表", res); var totalSize = res.data.total; var curPageData = res.data.data; if (this.page == 1) this.lists = []; this.lists = this.lists.concat(curPageData); if (this.lists.length < totalSize) { this.status = "more"; this.page++; } else { this.status = "noMore"; } }else{ this.$message.info(res.data.msg) } this.isInit = true; uni.stopPullDownRefresh(); }) .catch((err) => { this.isShowLoading = false; console.log("ERROR", err); uni.stopPullDownRefresh(); }); }, refresh() { this.page = 1; this.status = &#39;more&#39;; this.lists = []; this.loadData(); } }, } </script> <style lang="scss" scoped> .dele{ width: 30rpx; margin-right: 4px; } .fyjg{ color:$moneyJin } // 3图模式 .defaultStyle{ width: 32%; height: 210rpx; margin-bottom: 5px } // 4图模式 .fourGridStyle{ width: 49%; height: 210rpx;margin-bottom: 5px } // 5图模式(前3后2) .fiveGridStyleA{ width: 32%; height: 210rpx } .fiveGridStyleB{ width: 49%; height: 210rpx; margin-top: 5px; } // 图片基础样式 .imageBaseStyle{ width: 100%; height: 100%; border-radius: 8px } .blurStyle{ filter: blur(2px); width: 100%; height: 100% } .wrap { width: 100%; .title { height: 100rpx; line-height: 100rpx; image { width: 48rpx; height: 32rpx; margin: 0 24rpx; } } .content { padding: 0 20rpx; } } .nav-bar-wrap { position: fixed; top: 0; left: 0; right: 0; } .sort-wrap { position: fixed; left: 0; right: 0; } .height-100 { height: 100rpx; } .block-180 { width: 180rpx; min-width: 180rpx; height: 180rpx; min-height: 180rpx; position: relative; image { width: 100%; height: 100%; border-radius: 8rpx; } .null { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 8rpx; background-color: rgba(0, 0, 0, 0.45); color: #ffffff; font-size: 36rpx; text-align: center; line-height: 180rpx; } } .list-item+.list-item { border-top: 1rpx solid #eeeeee; } .overlay-animate { position: fixed; } .float-action { width: 72rpx; height: 72rpx; border-radius: 50%; // background-color: rgba(165, 165, 165, .85); position: fixed; right: 20rpx; bottom: 280rpx; z-index: 996; border: 1rpx solid #cccccc; .cuIcon-cart { color: #cccccc; } } .animate { position: fixed; border-radius: 50%; z-index: 995; transform-origin: 50% 50%; transition: transform linear 0.5s, left linear 0.5s, top cubic-bezier(0.3, -0.2, 1, 0) 0.5s !important; image { width: 100rpx; height: 100rpx; border-radius: 50%; } } // 商品卡片line .fu-goods-line { /* min-height: 570rpx; */ // padding: 24rpx 0; border-radius: 16rpx; background-color: #ffffff; // margin-top: 20rpx; display: flex; // border-bottom: 1rpx solid #EEEEEE; margin-bottom: 24rpx; width: calc(100% - 20px); margin: 10px; .block-246 { // padding: 24rpx 24rpx 0; .img { width: 140rpx; height: 140rpx; border-radius: 6rpx; background-color: #eeeeee; } } .content { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; } } // 商品卡片block .fu-goods-block { overflow: hidden; margin-bottom: 20rpx; padding: 0 10rpx; .wrap-box { background-color: #ffffff; border-radius: 16rpx; .square-wrap { width: 100%; height: 0; padding-bottom: 100%; box-sizing: border-box; position: relative; .square-box { position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: 16rpx 16rpx 0 0; image { width: 100%; height: 100%; border-radius: 24rpx 24rpx 0 0; } } } .image { width: 100%; border-radius: 24rpx 24rpx 0 0; } } .content { padding: 20rpx; } } .item-activity-label { padding: 2rpx 5rpx; /* margin: 5rpx; */ font-size: 24rpx; border-radius: 6rpx; border: 1px solid; margin: 0rpx 1px 0px; display: inline-block; transform: scale(0.8); } .search-form { margin-left: 12rpx; } .item-goods-label { padding: 4rpx 10rpx; margin-right: 10rpx; height: 32rpx; background: rgba(255, 239, 239, 1); border-radius: 4px; color: #ff6464; font-size: 24rpx; text-align: center; width: 84rpx; } .item-activity-label { padding: 0 8rpx; height: 32rpx; line-height: 30rpx; border: 1px solid #FA2033; opacity: 1; border-radius: 4rpx; font-size: 20rpx; font-family: PingFang SC; font-weight: 400; color: #FA2033; margin-right: 16rpx; &:nth-of-type(1) { border: 1px solid #0A7CE6; color: #0A7CE6; } } .padding-lr-24 { padding: 0 24rpx; } .padding-lr-4 { padding: 0 4rpx; } .sales-number { margin-top: 16rpx; } .through-price { margin-left: 16rpx; color: #BFBFBF; } ::v-deep .solid-bottom::after { border-bottom: 0; } .pr { position: relative; } .zd { position: absolute; z-index: 1; width: 30px; top: 0; left: 0 } .car { width: 104rpx; height: 104rpx; position: fixed; right: 28rpx; bottom: 300rpx; background: url(https://apps.xiaodan01.com/xcx/car-s.png); background-size: 100% 100%; } // new .template-circle { max-height: 100vh; } .tn-tabbar-height { min-height: 120rpx; height: calc(140rpx + env(safe-area-inset-bottom) / 2); } /* 自定义导航栏内容 start */ .custom-nav { height: 100%; &__back { margin: auto 5rpx; font-size: 40rpx; margin-right: 10rpx; margin-left: 30rpx; flex-basis: 5%; } &__search { flex-basis: 60%; width: 100%; height: 100%; &__box { width: 100%; height: 70%; padding: 10rpx 0; margin: 0 30rpx; border-radius: 60rpx 60rpx 0 60rpx; font-size: 24rpx; } &__icon { padding-right: 10rpx; margin-left: 20rpx; font-size: 30rpx; } &__text { color: #AAAAAA; } } } .logo-image { width: 60rpx; height: 60rpx; position: relative; margin-top: -15rpx; } .logo-pic { background-size: cover; background-repeat: no-repeat; // background-attachment:fixed; background-position: top; border-radius: 50%; } /* 自定义导航栏内容 end */ /* 博主头像 start*/ .image-circle { // padding: 95rpx; width: 190rpx; height: 190rpx; font-size: 40rpx; font-weight: 300; position: relative; } .image-pic { background-size: cover; background-repeat: no-repeat; // background-attachment:fixed; background-position: top; border-radius: 10rpx; } /* 文章内容 start*/ .blogger { &__item { padding: 30rpx; } &__author { &__btn { margin-right: -12rpx; opacity: 0.5; } } &__desc { line-height: 55rpx; &__label { padding: 0 20rpx; margin: 0rpx 18rpx 0 0; &--prefix { color: #00FFC8; padding-right: 10rpx; } } &__content {} } &__content { margin-top: 18rpx; padding-right: 18rpx; &__data { line-height: 46rpx; text-align: justify; overflow: hidden; transition: all 0.25s ease-in-out; } &__status { margin-top: 10rpx; font-size: 26rpx; color: #82B2FF; } } &__main-image { border-radius: 16rpx; &--1 { max-width: 80%; max-height: 300rpx; } &--2 { max-width: 260rpx; max-height: 260rpx; } &--3 { height: 212rpx; width: 100%; } } &__count-icon { font-size: 40rpx; padding-right: 5rpx; } &__ad { width: 100%; height: 500rpx; transform: translate3d(0px, 0px, 0px) !important; ::v-deep .uni-swiper-slide-frame { transform: translate3d(0px, 0px, 0px) !important; } .uni-swiper-slide-frame { transform: translate3d(0px, 0px, 0px) !important; } &__item { position: absolute; width: 100%; height: 100%; transform-origin: left center; transform: translate3d(100%, 0px, 0px) scale(1) !important; transition: transform 0.25s ease-in-out; z-index: 1; &--0 { transform: translate3d(0%, 0px, 0px) scale(1) !important; z-index: 4; } &--1 { transform: translate3d(13%, 0px, 0px) scale(0.9) !important; z-index: 3; } &--2 { transform: translate3d(26%, 0px, 0px) scale(0.8) !important; z-index: 2; } } &__content { border-radius: 40rpx; width: 640rpx; height: 500rpx; overflow: hidden; } &__image { width: 100%; height: 100%; } } } /* 文章内容 end*/ /* 间隔线 start*/ .tn-strip-bottom { width: 100%; border-bottom: 20rpx solid rgba(241, 241, 241, 0.8); } /* 间隔线 end*/ /* 广告内容 start */ .ad-image { width: 80rpx; height: 80rpx; position: relative; } .ad-pic { background-size: cover; background-repeat: no-repeat; // background-attachment:fixed; background-position: top; border-radius: 20%; } /* 自定义导航栏内容 end */ /* 全屏轮播 start*/ .card-swiper { height: 100vh !important; } .card-swiper swiper-item { width: 750rpx !important; left: 0rpx; box-sizing: border-box; overflow: initial; } .card-swiper swiper-item .swiper-item { width: 100%; display: block; height: 100vh; border-radius: 0rpx; transform: scale(1); transition: all 0.2s ease-in 0s; overflow: hidden; } .card-swiper swiper-item.cur .swiper-item { transform: none; transition: all 0.2s ease-in 0s; } .card-swiper swiper-item .swiper-item-png { margin-top: -50vh; width: 100%; display: block; border-radius: 0rpx; transform: translate(1040rpx, 20rpx) scale(0.5, 0.5); transition: all 0.6s ease 0s; // overflow: hidden; } .card-swiper swiper-item.cur .swiper-item-png { margin-top: -100vh; width: 900rpx; transform: translate(-80rpx, 0rpx) scale(1, 1); transition: all 0.6s ease 0s; } .image-banner { display: flex; align-items: center; justify-content: center; } .image-banner image { width: 100%; } /* 轮播指示点 start*/ .indication { z-index: 9999; width: 100%; height: 36rpx; position: fixed; // display:flex; display: block; flex-direction: row; align-items: center; justify-content: center; } .spot { background-color: #000; opacity: 0.3; width: 10rpx; height: 10rpx; border-radius: 20rpx; margin: 20rpx 0 !important; left: 95vw; top: -60vh; position: relative; } .spot.active { opacity: 0.6; height: 30rpx; background-color: #000; } /* 资讯主图 start*/ .image-article { border-radius: 8rpx; border: 1rpx solid #F8F7F8; width: 200rpx; height: 200rpx; position: relative; } .image-pic { background-size: cover; background-repeat: no-repeat; // background-attachment:fixed; background-position: top; border-radius: 10rpx; } .article-shadow { border-radius: 15rpx; box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07); } /* 文字截取*/ .clamp-text-1 { -webkit-line-clamp: 1; display: -webkit-box; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } .clamp-text-2 { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } /* 标签内容 start*/ .tn-tag-content { &__item { display: inline-block; line-height: 35rpx; padding: 5rpx 25rpx; &--prefix { padding-right: 10rpx; } } } /* 图标容器9 start */ .icon9 { &__item { width: 30%; background-color: #FFFFFF; border-radius: 10rpx; padding: 30rpx; margin: 20rpx 10rpx; transform: scale(1); transition: transform 0.3s linear; transform-origin: center center; &--icon { width: 110rpx; height: 110rpx; font-size: 65rpx; border-radius: 50%; margin: 20rpx 40rpx; position: relative; z-index: 1; &::after { content: " "; position: absolute; z-index: -1; width: 100%; height: 100%; left: 0; bottom: 0; border-radius: inherit; opacity: 1; transform: scale(1, 1); background-size: 100% 100%; background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg5.png); } } } } /* 悬浮 */ .tnxuanfu { animation: suspension 3s ease-in-out infinite; } @keyframes suspension { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.8rem); } } /* 悬浮按钮 */ .button-shop { width: 90rpx; height: 90rpx; display: flex; flex-direction: row; position: fixed; /* bottom:200rpx; right: 20rpx; */ left: 5rpx; top: 5rpx; z-index: 1001; border-radius: 100px; opacity: 0.9; } /* 按钮 */ .edit { bottom: 300rpx; right: 75rpx; position: fixed; z-index: 9999; } .pa, .pa0 { position: absolute } .pa0 { left: 0; top: 0 } .bg0 { width: 100rpx; height: 100rpx; top: 50%; left: 50%; transform: translate(-50%, -50%); } .bg1 { width: 100%; height: 100%; } .hx-box { top: 50%; left: 50%; width: 100rpx; height: 100rpx; transform-style: preserve-3d; transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg); } .hx-box .pr { width: 100rpx; height: 100rpx; transform-style: preserve-3d; animation: hxz 20s linear infinite; } @keyframes hxz { 0% { transform: rotateX(0deg); } 100% { transform: rotateX(-360deg); } } .hx-box .pr .pa0 { width: 100rpx; height: 100rpx; /* border: 4px solid #5ec0ff; */ border-radius: 1000px; } .hx-box .pr .pa0 .span { display: block; width: 100%; height: 100%; background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc4.png) no-repeat center center; background-size: 100% 100%; animation: hx 4s linear infinite; } @keyframes hx { to { transform: rotate(360deg); } } .hx-k1 { transform: rotateX(-60deg) rotateZ(-60deg) } .hx-k2 { transform: rotateX(-30deg) rotateZ(-30deg) } .hx-k3 { transform: rotateX(0deg) rotateZ(0deg) } .hx-k4 { transform: rotateX(30deg) rotateZ(30deg) } .hx-k5 { transform: rotateX(60deg) rotateZ(60deg) } .hx-k6 { transform: rotateX(90deg) rotateZ(90deg) } </style>
11-08
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值