Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 将图像与按钮合并时出现问题_Html - Fatal编程技术网

Html 将图像与按钮合并时出现问题

Html 将图像与按钮合并时出现问题,html,Html,伙计们,看看这个: 你会注意到,当你点击按钮,它会带你去 如何删除结尾处的“x=118&y=22”。因为我的表单是get表单,因此它会更改我的代码 请帮助这是元素的标准行为,我认为您无法更改它 您可以改为使用标记: <button type="submit"> <img src="someimage.jpg" /> </button> 我认为这是一种行为,除了与这种行为作斗争之外,您可以在input type=submit上应用css。具有背景图像属性

伙计们,看看这个:

你会注意到,当你点击按钮,它会带你去

如何删除结尾处的“x=118&y=22”。因为我的表单是get表单,因此它会更改我的代码


请帮助这是
元素的标准行为,我认为您无法更改它

您可以改为使用
标记:

<button type="submit">
  <img src="someimage.jpg" />
</button>

我认为这是一种行为,除了与这种行为作斗争之外,您可以在input type=submit上应用css。具有背景图像属性


< input type=submit id='submitButton' value='submit' />

<style>
#submitButton {
  width: 100px;
  height: 55px;
  padding: 55px 0 0;
  margin: 0;
  border: 0;
  background: transparent url(pathtoyourimage/image.gif) no-repeat center top;
  overflow: hidden;
  cursor: pointer; /* hand-shaped cursor */
  cursor: hand; /* for IE 5.x */
}
</style>



#提交按钮{
宽度:100px;
高度:55px;
填充:55px0;
保证金:0;
边界:0;
背景:透明url(pathtoyourimage/image.gif)无重复中心顶部;
溢出:隐藏;
光标:指针;/*手形光标*/
光标:hand;/*用于IE 5.x*/
}

这会给按钮添加一个图像,但不会改变按钮本身!我已经修改了我的回复,以了解你要求的更多细节。

< input type=submit id='submitButton' value='submit' />

<style>
#submitButton {
  width: 100px;
  height: 55px;
  padding: 55px 0 0;
  margin: 0;
  border: 0;
  background: transparent url(pathtoyourimage/image.gif) no-repeat center top;
  overflow: hidden;
  cursor: pointer; /* hand-shaped cursor */
  cursor: hand; /* for IE 5.x */
}
</style>