-1
我有文件.psd大小为1920X1080。 我需要制作一个响应式网站,它适合小屏幕和大屏幕。 我从这个psd html制作像素完美的技术。 我只是不明白如何使它从小屏幕设计。 请指教。psd到html 1920X1080
我有文件.psd大小为1920X1080。 我需要制作一个响应式网站,它适合小屏幕和大屏幕。 我从这个psd html制作像素完美的技术。 我只是不明白如何使它从小屏幕设计。 请指教。psd到html 1920X1080
使用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。根据内容高度应该是动态的 –