5条回答 默认 最新
- CSDN专家-天际的海浪 2021-09-10 00:17关注
输入框里不能加除了文字之外的东西,
这个效果是把输入框的边框隐藏在外面套个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>
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
- ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
- ¥15 cmd cl 0x000007b
- ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
- ¥500 火焰左右视图、视差(基于双目相机)
- ¥100 set_link_state
- ¥15 虚幻5 UE美术毛发渲染
- ¥15 CVRP 图论 物流运输优化
- ¥15 Tableau online 嵌入ppt失败
- ¥100 支付宝网页转账系统不识别账号