[英]asp.net ajaxcontrolkit balloon popup extender bg color
How to change the bg color of an ajaxcontroltoolkit balloon extender? 如何更改ajaxcontroltoolkit气球扩展器的bg颜色?
I have a panel inside it but I can only set the panel bg color which looks weird. 我内部有一个面板,但是我只能设置看起来怪异的面板背景色。
Code: 码:
<asp:Panel ID="Panel1" runat="server" style="background-color:Red">
Type some data in here
</asp:Panel>
<ajaxToolkit:BalloonPopupExtender ID="PopupControlExtender2" runat="server"
TargetControlID="lblBalloon"
BalloonPopupControlID="Panel1"
Position="BottomRight"
BalloonStyle="Rectangle"
BalloonSize="Small"
UseShadow="true"
ScrollBars="Auto"
DisplayOnMouseOver="true"
DisplayOnFocus="false"
DisplayOnClick="False" />
</asp:Content>
I want to change the white part bg color of the balloon: 我想更改气球的白色部分bg颜色:
How to do that? 怎么做?
its actually not a background color
in background, it has a sprite image in background, to change the background image of the balloon, use the style below 它实际上不是background color
,它在背景中有一个精灵图像,要更改气球的背景图像,请使用以下样式
.ajax__balloon_popup .oval {
background-image: url('/image-path');
}
You can get a nice custom popup using the following markup and css and change the background color and other styles as you want: 您可以使用以下标记和CSS获得不错的自定义弹出窗口,并根据需要更改背景颜色和其他样式:
<cc:BalloonPopupExtender
ID="bb1" runat="server"
BalloonStyle="Custom"
CustomClassName="custom-popup"
Position="BottomRight"
BalloonSize="Medium"
UseShadow="false"
CustomCssUrl="style.css"
DisplayOnMouseOver="true"
BalloonPopupControlId="infoPopup"
TargetControlID="lnkInfo1">
<Animations>
<OnShow>
<Sequence>
<HideAction Visible="true" />
<FadeIn Duration=".5" Fps="20" />
</Sequence>
</OnShow>
<OnHide>
<FadeOut Duration=".5" Fps="20" />
</OnHide>
</Animations>
</cc:BalloonPopupExtender>
add to your style.css: 添加到您的style.css:
.custom-popup {
background-color: #fdfff7;
display: inline-block;
width: 300px;
height: 120px;
text-align: center;
vertical-align: top;
font-size: 11px;
border: solid 1px #cbbeac;
border-radius: 12px;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.