【问题标题】:psd to html 1920X1080psd转html 1920X1080
【发布时间】:2017-03-29 10:13:09
【问题描述】:

我有大小为 1920X1080 的文件 .psd。 我需要制作适合大小屏幕的响应式网站。 我用像素完美技术从这个 psd html 制作。 我只是不明白如何从中设计小屏幕。 请指教。

【问题讨论】:

    标签: html css markup psd


    【解决方案1】:

    使用 CCS3 媒体查询!桌面优先示例:

    // Your code for Desktop devices
    
    @media only screen and (max-width: 768px) {
      // Here your code for mobile
    }
    

    或移动优先

    // Your code for Mobile devices
    
    @media only screen and (min-width: 768px) {
      // Here your code for tablet
    }
    
    @media only screen and (min-width: 992px) {
      // Here your code for Small Desktop
    }
    

    不同的规则:

    @media screen and (max-width: 992px) and (max-height: 700px) {
          // Code
    }
    

    或:

    @media screen and (max-width: 992px) and (min-height: 400px) {
          // Code
    }
    

    这些只是一些例子。您必须研究媒体查询。

    【讨论】:

    • 身高呢?如何调整不同屏幕的块高度?
    • @GeorgeH。高度应该是动态的,取决于内容
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多