Commit 466c7105 authored by wangqinghua's avatar wangqinghua

样式调整

parent babde74e
...@@ -13,12 +13,30 @@ export class VerticaLampDirective { ...@@ -13,12 +13,30 @@ export class VerticaLampDirective {
lineChange() { lineChange() {
let child_div = this.el.nativeElement.children; let child_div = this.el.nativeElement.children;
setTimeout(()=>{ setTimeout(()=>{
if(child_div.length > 0 ){ console.log(child_div[0].offsetWidth)
if(child_div.length > 0 && child_div[0].offsetWidth > 700 ){
// this.start(); // this.start();
} }
},10) },1000)
} }
//横向跑马灯
start() {
let child_div = this.el.nativeElement.children;
const scrollWidth = this.el.nativeElement.offsetWidth;
const textWidth = child_div[0].offsetWidth;
console.log(child_div[0]);
let i = scrollWidth;
setInterval(()=>{
i--;
if(i < -textWidth){
i = scrollWidth;
}
child_div[0].style.left = i + 'px';
},20)
}
} }
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</ion-header> </ion-header>
<ion-content #content> <ion-content #content>
<div #topHeight> <div #topHeight>
<div class="home-middle-tips"> <div #homeMiddleTips class="home-middle-tips">
<ion-row> <ion-row>
<ion-col col-2 class="middle-left"> <ion-col col-2 class="middle-left">
<img src="./assets/imgs/flag.png"> <img src="./assets/imgs/flag.png">
......
...@@ -86,10 +86,16 @@ page-home { ...@@ -86,10 +86,16 @@ page-home {
//中间 //中间
.home-middle-tips { .home-middle-tips {
padding: 1rem;
font-size: 1.5rem; font-size: 1.5rem;
line-height: 1.6rem; line-height: 1.6rem;
font-weight: 400; font-weight: 400;
height: 0px;
overflow: hidden;
-webkit-transition: height 500ms;
-moz-transition: height 500ms;
-ms-transition: height 500ms;
-o-transition: height 500ms;
transition: height 500ms;
ion-row { ion-row {
padding: .5rem 0; padding: .5rem 0;
......
...@@ -26,6 +26,7 @@ export class HomePage { ...@@ -26,6 +26,7 @@ export class HomePage {
@ViewChild('verticaLamp') verticaLamp: ElementRef; @ViewChild('verticaLamp') verticaLamp: ElementRef;
@ViewChild('tabSpan') tabSpan: ElementRef; @ViewChild('tabSpan') tabSpan: ElementRef;
@ViewChild('topHeight') topHeight: ElementRef; @ViewChild('topHeight') topHeight: ElementRef;
@ViewChild('homeMiddleTips') homeMiddleTips: ElementRef;
picture: string = AppGlobal.domain + '/wisdomgroup'; picture: string = AppGlobal.domain + '/wisdomgroup';
slidersItems = []; slidersItems = [];
...@@ -143,6 +144,8 @@ export class HomePage { ...@@ -143,6 +144,8 @@ export class HomePage {
//横向跑马灯 //横向跑马灯
start() { start() {
this.homeMiddleTips.nativeElement.style.height = "80px";
this.homeMiddleTips.nativeElement.style.padding = "1rem";
let child_div = this.verticaLamp.nativeElement.children; let child_div = this.verticaLamp.nativeElement.children;
const scrollWidth = this.verticaLamp.nativeElement.offsetWidth; const scrollWidth = this.verticaLamp.nativeElement.offsetWidth;
const textWidth = child_div[0].offsetWidth; const textWidth = child_div[0].offsetWidth;
......
...@@ -42,20 +42,20 @@ page-mine { ...@@ -42,20 +42,20 @@ page-mine {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-bottom: 1rem;
} }
.group-right { .group-right {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
align-items: center; align-items: center;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
padding-bottom: 1rem;
ion-icon { ion-icon {
margin-left: auto; margin-left: auto;
} }
} }
ion-row{ ion-row{
padding-top: .6rem; padding-top: .6rem;
padding-bottom: .6rem;
} }
img{ img{
width: 2.5rem; width: 2.5rem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment