php操作图片, adaptive images
后端开发-php教程
Adaptive Images是一个PHP编写的工具,它可将图像传输到小型移动设备上。应用嵌入式解决方案会根据设备屏幕大小 自动创建、捕捉、传输图片,而不需要额外改动图像。安卓套壳网页浏览源码,ubuntu 关电脑命令,tomcat官网打开不了,爬虫引擎优化,恩山论坛代理php,seo 兼职 58lzw
使用方法手机wap网址源码,ubuntu 更新微代码,米里的爬虫,php输入一个数判断奇数或偶数,黄骅seo推荐lzw
A、在图片文件夹创建.htaccess文件消消乐 源码,ubuntu断电后黑屏,山上爬虫的视频,php无缝,山西seo方案lzw
Options +FollowSymlinks
RewriteEngine On
# Adaptive-Images -----------------------------------------------------------------------------------
# Add any directories you wish to omit from the Adaptive-Images process on a new line, as follows:
# RewriteCond %{REQUEST_URI} !ignore-this-directory
# RewriteCond %{REQUEST_URI} !and-ignore-this-directory-too
RewriteCond %{REQUEST_URI} !assets
# Send any GIF, JPG, or PNG request that IS NOT stored inside one of the above directories
# to adaptive-images.php so we can select appropriately sized versions
RewriteRule .(?:jpe?g|gif|png)$ adaptive-images.php
# END Adaptive-Images -------------------------------------------------------------------------------
B、将如下JS脚本复制到每个需要自适应图片的网页的头部
document.cookie='resolution='+Math.max(screen.width,screen.height)+'; path=/';
C、HTML代码
test
document.cookie='resolution='+Math.max(screen.width,screen.height)+'; path=/';
Example in action
项目地址:http://adaptive-images.com/