怎样在输入框里加除了文字之外的东西?

img

输入框里不能加除了文字之外的东西,

这个效果是把输入框的边框隐藏在外面套个div, div模拟成输入框的样式,并且在div中加文字之外的东西

例子代码如下:(如有帮助,望采纳!谢谢! 点击我这个回答右上方的【采纳】按钮)

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title> 页面名称 </title>
<style type="text/css">
.inputbox {
    width: 300px;
    height: 36px;
    border: 1px solid #999;
    border-radius: 18px;
    padding-left: 20px;
    background-color: #fff;
}
.inputbox input {
    width: 240px;
    height: 36px;
    border-style: none;
    outline-style: none;
    padding-left: 10px;
    font-size: 22px;
    background-color: transparent;
    vertical-align: middle;
}
.inputbox img {
    vertical-align: middle;
}
</style>
</head>
<body>

<div class="inputbox"><img src="https://demosc.chinaz.net/Files/pic/icons/5968/f2.png" width="36" height="36" alt="" /><input type="text" placeholder="请输入订单号" /></div>

</body>
</html>

img

除了文字之外的东西,你想加点什么。

你这个是一个列表,并不是所有的内容都是用输入框做的。有按钮,图片,div等标记组成。

不是很明白,文字以外的东西具体说明是什么呢

要学会灵活运用f12,找一个有输入框的网站一看他的元素和样式不就明白了。