html%3cinput%3e居中,html - How to add a SVG icon within an input? - Stack Overflow

I need to place icons within the inputs for creating a new user. It's probably a really easy task for someone who knows their way around front end code. However I don't. Here is the wireframe and then I show my code.

WIREFRAME

hkgyb.png

As you can see. There are icons on the left side of the inputs. Right now I have the SVG's in my directory and ready to go I just need to know how to place them within the input. Here is the code for the form

FORM

So I have the placeholder with a string which currently just printing that string. I need to put the icons within that I think? Here is the css I have for the icons.

CSS

.icon-email {

background-image: image-url('email-field.svg');

}

.icon-name {

background-image: image-url('name-field.svg');

}

Is there a way I can place these classes within the place holder?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值