本文介绍了如何设置提交按钮的文字样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个样式如下的链接:
< 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.
更多推荐
如何设置提交按钮的文字样式
发布评论