vw-layout icon indicating copy to clipboard operation
vw-layout copied to clipboard

vw做的适配网站怎么设置最大宽度

Open xian107 opened this issue 6 years ago • 7 comments

比如当视窗宽度大于768,就给html或body设置一个最大宽度,然后margin:auto;请问这个怎么解决 image

xian107 avatar Sep 17 '18 10:09 xian107

@airen 望大神指点

xian107 avatar Sep 17 '18 10:09 xian107

@airen 望大神指点

我说下我的理解,在使用vw的时候,如果出现上面这样的情况,就会需要根据项目实际情况来判断了,如果是需要设计成pc端的,那就没必要用这个方法来写,不然就这样。它的样式也会根据宽度自适应。因为viewportWidth 就是整个屏幕的宽度。

lod61 avatar Sep 30 '18 07:09 lod61

@liuqianghui 那 PC 和 mobile 是要分别打包吗?

kid1412621 avatar May 04 '19 12:05 kid1412621

@liuqianghui 那 PC 和 mobile 是要分别打包吗?

分情况吧,如果是写了2份的话,就需要打包成2个了,如果是用mobile screen做适配的话,不需要了。不过如果是用vw的话,一般是用来做移动端方便适配吧。我就一般这么用😁

lod61 avatar May 04 '19 12:05 lod61

技术有限,想问下适配 Mobile 怎么做呢?

On Sat, May 4, 2019, 20:54 liuqianghui [email protected] wrote:

@liuqianghui https://github.com/liuqianghui 那 PC 和 mobile 是要分别打包吗?

分情况吧,如果是写了2份的话,就需要打包成2个了,如果是用mobile screen做适配的话,不需要了。不过如果是用vw的话,一般是用来做移动端方便适配吧。我就一般这么用😁

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/airen/vw-layout/issues/4#issuecomment-489324440, or mute the thread https://github.com/notifications/unsubscribe-auth/AGIPRJQYECDFDIZZ7C5JOO3PTWBPPANCNFSM4FVOPZYA .

kid1412621 avatar May 06 '19 12:05 kid1412621

你好👋 一般适配可以通过js检测设备,然后不同设备加载不同样式,或者不同页面。详细可以看看px rem em vh vw 这些单位的意思

2019年5月6日 +0800 PM8:24 kid1412621 [email protected],写道:

技术有限,想问下适配 Mobile 怎么做呢?

On Sat, May 4, 2019, 20:54 liuqianghui [email protected] wrote:

@liuqianghui https://github.com/liuqianghui 那 PC 和 mobile 是要分别打包吗?

分情况吧,如果是写了2份的话,就需要打包成2个了,如果是用mobile screen做适配的话,不需要了。不过如果是用vw的话,一般是用来做移动端方便适配吧。我就一般这么用😁

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/airen/vw-layout/issues/4#issuecomment-489324440, or mute the thread https://github.com/notifications/unsubscribe-auth/AGIPRJQYECDFDIZZ7C5JOO3PTWBPPANCNFSM4FVOPZYA .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

lod61 avatar May 08 '19 07:05 lod61