摘要:
具体代码如下: <!html> <head> <meta charset="utf-8"> <title> css3 图片等比缩放,居中显示 </title> <style> .mysec{ width:400px; height:200px; border:solid 1px #ccc; back 阅读全文
摘要:
img{ width: auto; height: auto; max-width: 100%; max-height: 100%; } 根据父容器的自动缩放,并保持图片原来的比例。这样你设置父容器的大小就可以啦。 阅读全文