html - 删除图像上的 alt 标签文本的边框

标签 html css paypal

我正在尝试删除 alt 标记文本的边框。我在 paypal 表单中使用透明图像作为按钮,通过 css 链接。 paypal 按钮采用 alt 标签作为按钮文本,并在其周围放置边框。我不清楚为什么会发生这种情况,但这是我必须与 Paypal 合作的。显然我必须使用图像。因此,我使用透明图像,这样我就可以在 css 中对其进行样式设置,使其看起来像我的其他按钮,而不是尝试获取每个按钮状态的屏幕截图。 enter image description here

我将代码配对,仅关注文本“查看购物车”周围的边框。

CSS

//link to my transparent button with no text on it
#vyc {
      background-image: url(http://lakenney.com/kenney_lucille-final/images/vyc.png) no-repeat;
  }
//the user agent that is controlling the outer border
user agent stylesheetinput[type="hidden" i], input[type="image" i], input[type="file" i] {
      -webkit-appearance: initial;
      padding: 20px;
      background-color: initial;
      border: dotted;
      border-top-color: red;
  }
//a couple of tags I'm using to try to access the alt tag border not working
#vyc img[alt] {
      /*border: 1px dashed #3D8EA5;*/
      border: transparent !important;
  }
input#vyc img[alt] {
      border: transparent !important;
  }

HTML

这是指向同一代码的 jsfiddle 链接: http://jsfiddle.net/lakenney/w0zpmutn/

最佳答案

输入(type =“image”)需要一个缺少边框的源图像。能不能把透明图片作为src值?

<input type="image" src="http://lakenney.com/kenney_lucille-final/images/vyc.png" id="vyc" border="0" name="submit" value="View Cart" alt="View Cart">

http://jsfiddle.net/w0zpmutn/2/

关于html - 删除图像上的 alt 标签文本的边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30548922/

相关文章:

html - 显示遵循 Razor 语法的文字句点

javascript - Electron 的本地存储未在动态创建的元素上保存我的点击事件

PayPal Prestashop 货币转换

HTML 正文边距和填充设置为零会导致框中的图像被裁剪

php - 定期付款不适用于 braintree 中的 PayPal 按钮

paypal - 通过 Paypal 检索用户的信用卡详细信息

html - chrome 38 屏幕尺寸开发者工具

html - 搜索引擎结果 - 不排名

javascript - 根据嵌套指令 Angular 的宽度更改文本

c# - Win 2003 服务器忽略 css 样式