当前位置:网站首页>Pictures are adaptive to the screen
Pictures are adaptive to the screen
2022-07-28 07:04:00 【Jilei mountain Moyun cave】
<body><ul></ul></body>
var bodyWidth = $(window).width();
var conwidth = window.innerWidth;
var Wproportion = bodyWidth / conwidth;
console.log(Wproportion)
var H = 200;
var W = 200;
var newH = Wproportion* H;
var newW = Wproportion* W;
for(var i = 1; i< 8;i++){
$('ul').append('<li><img class="imgsize" src="img/'+i+'.jpg"/></li>')
}
$(".imgsize").css({'width':newW,'height':newH});
边栏推荐
- As a result, fill in the birthday candles
- Software testing (concept)
- 小甲鱼C(第六章数组1、2)
- MOOC翁恺C语言 第四周:进一步的判断与循环:1.逻辑类型与运算2.级联和嵌套的判断
- MOOC翁恺C语言第七周:数组运算:1.数组运算2.搜索3.排序初步
- 小甲鱼C(第五章循环控制结构程序567)break和continue语句
- Repair the faulty sector
- Test interview questions collection (II) | test tools (with answers)
- Shell script - sort, uniq, TR, array sort, cut, Eval command configuration
- DNS域名解析服务
猜你喜欢

Esxi community network card driver

Esxi arm edition version 1.10 update

Technology sharing | how to simulate real use scenarios? Mock technology to help you

RAID磁盘阵列

Detailed explanation of LNMP construction process

MOOC Weng Kai C language week 6: arrays and functions: 1. Arrays 2. Definition and use of functions 3. Parameters and variables of functions 4. Two dimensional arrays

raid磁盘阵列

Qgraphicsview promoted to qchartview

Custom component -- data listener

Archery database audit platform deployment
随机推荐
Technology sharing | common proxy tools for interface testing
Shell script -- program conditional statements (conditional tests, if statements, case branch statements, echo usage, for loops, while loops)
JS string method Encyclopedia
DNS domain name resolution
DNS域名解析
Canvas drawing 2
Technology sharing | how to do Assertion Verification in interface automated testing?
Ubuntu MySQL setting remote access permissions
What is a linear table?
组管理和权限管理
修复故障扇区
[learning notes] VIM editor
DNS forward resolution experiment
MOOC Weng Kai C language week 5: 1. cycle control 2. multiple cycles 3. cycle application
Pku-2739-sum of constructive prime numbers
MOOC翁恺C语言第七周:数组运算:1.数组运算2.搜索3.排序初步
Icc2 analysis timing artifact analyze_ design_ violations
SSH service configuration
Results fill in the blank. How many days of national day are Sundays (solved by pure Excel)
Shell script - regular expression