如何更改ajaxcontroltoolkit气球扩展器的bg颜色?
我有一个面板,但我只能设置看起来很奇怪的面板bg颜色。
代码:
<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>
我想更改气球的白色部分bg颜色:
怎么做?
答案 0 :(得分:0)
它实际上不是背景中的background color
,它在背景中有一个精灵图像,用于更改气球的背景图像,使用下面的样式
.ajax__balloon_popup .oval {
background-image: url('/image-path');
}
答案 1 :(得分:0)
您可以使用以下标记和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>
添加到你的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;
}