简体   繁体   English

移动优先响应式网页设计和响应式图像问题

[英]mobile first responsive web design and responsive images questions

I have created this sort of ecommerce website, with the aim to be visualized on a mobile phone web browser (possibly with an acceptable user experience on tablets/pcs/tvs also). 我创建了这种电子商务网站,旨在在手机Web浏览器上可视化(可能在平板电脑/个人电脑/电视上也具有可接受的用户体验)。

Yes, an awkward tempt of responsive web design: 是的,响应式网页设计的尴尬诱惑:

http://rosposhop.herokuapp.com http://rosposhop.herokuapp.com

As you can see, I used http://getbootstrap.com/ v. 3.x and I apologize in advance for my enormous ignorance on CSS. 如您所见,我使用了http://getbootstrap.com/ v.3.x,由于对CSS的无知,我事先表示歉意。

Mhh... I developed initially the site with a mobile handset in mind, and mainly the site do pretty wath I want in portrait mode, see mokup here: 恩……我最初在开发该网站时就考虑到了手机,主要是该网站在纵向模式下可以实现我想要的效果,请在此处查看mokup:

手机肖像现在的行为

My idea is that every page is basically composed as a list of boxes = square" divs of let say 320x320 or 440x440 pixels (to be defined..): 我的想法是,每个页面基本上都由框的列表=正方形的div组成,可以说320x320或440x440像素(待定义):

  • header (square box) 标头(方框)

  • list of N products (again: each product is a square box made by a square image and some textaul info and buttons). N个产品的列表(再次:每个产品都是一个由方形图像和一些textaul信息和按钮制成的方形框)。

  • footer 页脚

I would like that in case of mobile phone in landscape mode, under certain conditions of a minimum pixel width, I could visualize 2 boxes as showed in image here below: 我希望在横向模式下使用手机时,在最小像素宽度的某些条件下,我可以将2个框可视化,如下图所示:

手机横向期望行为

And I would like that in case of tablet/pc visualization, the boxes (let say images with a resolution of 320x320 or 440x440) could be arranged in some porportional way, filling the viewport, as sketced here: 我希望在平板电脑/ PC可视化的情况下,可以按照一定比例的方式排列这些框(例如,分辨率为320x320或440x440的图像),以填充视口,如下所示: 平板电脑横向所需的行为

I presume that some CSS media queries could help. 我认为某些CSS媒体查询可能会有所帮助。 Any idea ? 任何想法 ?

BTW, minor question about UX of my website naif approach: A part of my HTML/CSS superficial/erroneous approach... please overlook... 顺便说一句,关于我的网站naif方法的UX的一个小问题:我的HTML / CSS肤浅/错误方法的一部分...请忽略...

What do you think about user experience and navigation of the site above? 您如何看待上面网站的用户体验和导航?

In my idea mobile phones apps (web or native) especially in ecommerce contexts, are generally too complexes, hitting off / adpating the "big" websites maybe originally made for PC. 在我的想法中,尤其是在电子商务环境中,手机应用程序(网络或本机)通常过于复杂,无法运行/适应最初可能是为PC制作的“大型”网站。 My approach have been different: every product must be defined in a single box, with few buttons to manage the cart. 我的方法有所不同:每个产品都必须在一个框内定义,并且只有很少的按钮来管理购物车。

Any suggestion welcome thanks! 任何建议欢迎谢谢! giorgio twitter.com/solyarisoftware giorgio twitter.com/solyarisoftware

UPDATE (A draft solution using CSS media queries) UPDATE(使用CSS媒体查询的解决方案草案)

    /* product box (containing image) */
    .pb {
    position:relative;
    display:inline-block;
    text-align:left;
   }

    /* Smartphones (portrait) ----------- */
    @media only screen and (max-device-width : 480px) and (orientation: portrait) {
    .pb {width:100.0%;}
    }

    /* Smartphones (landscape) ----------- */
   @media only screen and (max-device-width : 480px) and (orientation: landscape) {
   .pb {width:49.718572%;}
   }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM