input输入框中应用background-image无法显示

想实现输入框的最左侧显示一个搜索图标,想用background-image和background-position来实现,但是奈何一直显示不出来,求解TAT(怀疑是url的问题)

div#fixed div#searchBox {
    display: inline-block;
    padding-left: 30px;
    background-image: url(images/bg-front.png);
    background-repeat: no-repeat;
    background-position: left top;
}
div#fixed div#searchBox input {
    width: 100px;
    margin-right: 20px;
    border: 1px solid gray;
}
阅读 4.5k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题