如何设置提交按钮的文字样式

编程入门 行业动态 更新时间:2024-10-11 07:30:28
本文介绍了如何设置提交按钮的文字样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个样式如下的链接:

< style>.添新{背景颜色:#FFF;显示:块;边距顶部:10像素;内边距:20px;颜色:#08c;border:3px虚线#08c;光标:指针;宽度:100%;框大小:border-box;字号:1em;}</style>< a class ='addNew'>< i class ="fa fa-plus"></i>添新< span style ='文字装饰:下划线'>对象</span></a>

我在文本内部使用了一个span标签,并使用了

解决方案

使用按钮元素.

< button class ='addNew'>< i class ="fa fa-plus"></i>添新< span style ='文字装饰:下划线'>对象</span></button>

...那么您可以拥有子元素,然后将其独立定位以进行样式设置.

I have a link styled as follows:

<style> .addNew{ background-color: #FFF; display: block; margin-top: 10px; padding: 20px; color: #08c; border:3px dashed #08c; cursor: pointer; width: 100%; box-sizing: border-box; font-size: 1em; } </style> <a class='addNew'> <i class="fa fa-plus" ></i> Add new <span style='text-decoration:underline'>Object</span> </a>

I am using a span-tag inside the text and a font-awesome icon. How can I use this for an submit button? I tried this:

<input type='submit' class='addNew' value="Add new Object">

But I have no idea how to style the text of the submit button.

解决方案

Use a button element.

<button class='addNew'> <i class="fa fa-plus" ></i> Add new <span style='text-decoration:underline'>Object</span> </button>

… then you can have child elements and target them independently for styling.

更多推荐

如何设置提交按钮的文字样式

本文发布于:2023-10-19 18:50:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1508441.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:样式   如何设置   按钮   文字

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!