Skip to content

Commit 80acc7a

Browse files
author
why2fly
committed
显示界面优化,主要适配手机屏幕2
显示界面优化,主要适配手机屏幕2
1 parent 1631f3a commit 80acc7a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<!--style="position:fixed;width:100%;height:25%" style="background:#EEEEEE;"style="background:url(https://api.uomg.com/api/rand.img3?_t=)"-->
1111

1212
<div style="text-align:center;width:100%;background:rgb(0, 0, 0);">
13-
<video id="video" controls style="width:90%;" v-on:click="playvideo(detail_items[0])" v-bind:poster="video_bgimg || detail_items[0] && detail_items[0].vod_pic"></video>
13+
<video id="video" controls style="height:100%;width:auto;" v-on:click="playvideo(detail_items[0])" v-bind:poster="video_bgimg || detail_items[0] && detail_items[0].vod_pic"></video>
1414
</div>
1515

1616
<div style="width:100%;background:rgb(0, 0, 0);">

public/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@ var vm = new Vue({
177177
console.log(this.videoWidth,this.videoHeight);
178178
if(this.videoWidth > this.videoHeight){
179179
this.style.width = "100%";
180+
this.style.height = "auto";
180181
}
181182
else{
182-
this.style.width = "80%";
183+
this.style.width = "auto";
184+
this.style.height = "100%";
183185
}
184186
});
185187
});
@@ -190,9 +192,11 @@ var vm = new Vue({
190192
console.log(this.videoWidth,this.videoHeight);
191193
if(this.videoWidth > this.videoHeight){
192194
this.style.width = "100%";
195+
this.style.height = "auto";
193196
}
194197
else{
195-
this.style.width = "80%";
198+
this.style.width = "auto";
199+
this.style.height = "100%";
196200
}
197201
});
198202
}

0 commit comments

Comments
 (0)