如何更改按钮的皮肤
大家好,我正在尝试将按钮和文本区域皮肤的皮肤(形状)更改为另一种。有点像第二张图。
Hello all I'm trying to change the skin (shape) of the button and textArea skin to another one. Some thing like the second picture .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您有不止一种可能性可以做到这一点:
使用背景图像(适用于每个浏览器,但我个人不喜欢它再次重新编辑并保存每个小细节的图像文件)
CSS:
或者,您可以使用较新的 CSS 属性来创建按钮。它们提供了你想要的一切,而且比使用背景图像要酷得多,但缺点是现在没有多少浏览器完全支持这一点(有些浏览器很长一段时间都不会支持,是的,IE,我的意思是你):
看这里创建 CSS 渐变: http://www.colorzilla.com/gradient-editor/
印象和教程可以使用纯CSS3:
http://technology.posterous .com/make-css3-buttons-that-are-extremely-fancy
http://www.kulturbanause.de/2010/05/css3-als-photoshop-ersatz -buttons-und-grafiken/
(德语,但是嘿,你将能够
查看按钮并阅读 CSS
尽管如此)
更简单的例子,可能就是这样
你需要:
http://capturedsparks.com/pure-css3-buttons/
您可以使用它们相同的属性用于设置文本区域的样式:
border
、background
、color
字体颜色等。You've got more than one possibility to do this:
Use a Background image (works in every browser, but I personally don't like it to re-edit and save the image file for every small detail again)
CSS:
Alternatively you can use the newer CSS properties to create buttons. They offer everything you want and it is WAY cooler than using background images, but the downside is not many browsers support this fully today (and some will not for a long time, yeah IE, I mean you):
Look here to create CSS Gradients: http://www.colorzilla.com/gradient-editor/
Impressions and tutorials of what's possible using pure CSS3:
http://technology.posterous.com/make-css3-buttons-that-are-extremely-fancy
http://www.kulturbanause.de/2010/05/css3-als-photoshop-ersatz-buttons-und-grafiken/
(in German, but hey, you'll be able
to see the buttons and read the CSS
neverthenless)
Simpler example, might be just what
you need:
http://capturedsparks.com/pure-css3-buttons/
You can use them same properties for styling a textarea:
border
,background
,color
for font color, etc.您可以在底部应用样式或提交 HTML 标签,例如:
这样您就可以添加背景图片:
问候!
You can apply an style to the bottom or submit HTML tag, like:
In this way you can add a background image:
Regards!
如果你想要与上面描述的完全相同的设计,那么就使用这个
if u want exactly the same design u described above then just use this