如何使按钮透明? [英] How to make buttons transparent ?

查看:103
本文介绍了如何使按钮透明?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我给了我的表格背景图片,我添加的按钮覆盖了它!



我尝试了什么: < br $>


i试图查找属性中的透明度设置,但我找不到。

i gave my form a background image and the buttons i added over it covers it up!

What I have tried:

i tried to look up for the transparency settings in the property but i couldnt find one.

推荐答案

如果这是WinForms然后你需要更聪明一点并使用setstyle播放Opacity - 有一篇MS文章告诉你如何如何:为您的控件提供透明背景 [ ^ ]以及CodeProject上更深入的一个在.NET中使用Alpha混合区域的透明位图按钮 [ ^ ]



使用WPF你必须玩弄画笔的不透明度 - Brush.Opacity属性(System.Windows。媒体) [ ^ ]



在Web中你应该可以使用
If this is WinForms then you need to be a bit cleverer and play the Opacity using setstyle - there is an MS Article that tells you how How to: Give Your Control a Transparent Background[^] and a slightly more in-depth one here on CodeProject Transparent Bitmap Buttons with Alpha-Blended Regions in .NET[^]

With WPF you have to play around with the brush's opacity - Brush.Opacity Property (System.Windows.Media)[^]

In Web stuff you should be able to use
MyButton.BackColor = Color.Transparent;

或在CSS中执行

background-color: transparent;


这篇关于如何使按钮透明?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆