web前端全系列 教程
1839个小节阅读:2243.3k
鸿蒙应用开发
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
xxxxxxxxxx
<style>
html,
body {
width: 100%;
height: 100%;
}
html,
body,
div,
p,
img,
input {
margin: 0;
padding: 0
}
.header {
width: 100%;
height: 1.5rem;
padding: 0rem 5.8rem;
box-sizing: border-box;
background-color: #eee;
display: flex;
align-items: center;
}
.left {
width: 1.68rem;
height: 0.63rem;
line-height: 0.63rem;
}
.center {
flex: 1;
padding: 0.1rem 0.3rem;
box-sizing: border-box;
height: 0.4rem;
}
.center input {
display: block;
width: 100%;
height: 0.4rem;
border-radius: 0.4rem;
border: 0.02rem solid #ff5000
}
input:focus {
outline: none;
}
.right {
width: 0.8rem;
height: 0.8rem;
line-height: 0.8rem;
}
img{
width: 100%;
height: 100%;
}
</style>
xxxxxxxxxx
<div class="header">
<div class="left">
<img src="https://gw.alicdn.com/imgextra/i4/O1CN019XWXNq1aAPOVMYSiu_!!6000000003289-2-tps-167-63.png"
alt="">
</div>
<div class="center">
<input type="text">
</div>
<div class="right">
<img src="https://gw.alicdn.com/imgextra/i4/O1CN01ftum4629SHP6bCqTm_!!6000000008066-2-tps-99-99.png" alt="">
</div>
</div>
<script>
window.onload = function () {
document.documentElement.style.fontSize = (document.documentElement.clientWidth / 1920) * 100 + 'px'
}
window.onresize = function () {
document.documentElement.style.fontSize = (document.documentElement.clientWidth / 1920) * 100 + 'px'
}
</script>