<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="vue.js"></script>
<title>Document</title>
</head>
<style>
.box{
width: 400px;
height: 40px;
border: 1px solid rebeccapurple;
border-radius: 25px;
display: flex;
}
.icon img {
width: 50px;
height: 40px;
}
.btn {
width: 80px;
height: 40px;
background:rebeccapurple;
border-radius: 25px;
text-align: center;
line-height: 40px;
color: white;
cursor: pointer;
}
.bar {
width: 270px;
height: 40px;
}
.bar input {
border: none;
outline: none;
width: 260px;
height: 35px;
}
</style>
<body>
<div class="box">
<div class="icon"><img src="sousuo.svg" alt=""></div>
<div class="bar">
<input type="text" v-model="input">
</div>
<div class="btn">搜索</div>
</div>
<script type="text/javascript">
const app = new Vue({
el:".box",
data:{
input:'',
}
})
</script>
</body>
</html>
input框,左边icon,中间输入框,右边button样式
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 效果:https://songboriceboy.github.io/js_homework/word_move....
- 1.添加交互名字,并加载本地测试html文件 加载web 2.写注入代码,并在WKwebView加载完成后注入js...
- 输入框获取焦点时去掉蓝色边框 input:focus{ outline: none; } 修改input框的...