在ASP上显示文本:图像标记

时间:2015-09-03 07:31:47

标签: asp.net vb.net ajaxcontroltoolkit

因此,对于我正在构建的网站,我需要实现一个AjaxToolKit SLideshowExtender,它在顶部显示带有文本的图像,我尝试了一些东西,例如将标记放在表格中,然后在其下面添加标签标记,但它显示文本在imageslider下面,有没有办法在背景图像上实现SlideShowExtender实际工作和看起来不错,或者在幻灯片放大器顶部显示不与图像一起滑动的文本。

代码背后:

<System.Web.Services.WebMethod(), System.Web.Script.Services.ScriptMethod()>
Public Shared Function GetImagesNL() As AjaxControlToolkit.Slide()

    Dim Slides As New List(Of AjaxControlToolkit.Slide)
    Slides.Add(New AjaxControlToolkit.Slide("/Images/Logos/Slide NL 1.png", "", ""))
    Slides.Add(New AjaxControlToolkit.Slide("/Images/Logos/Slide NL 2.png", "", ""))
    Slides.Add(New AjaxControlToolkit.Slide("/Images/Logos/Slide NL 3.png", "", ""))
    Slides.Add(New AjaxControlToolkit.Slide("/Images/Logos/Slide NL 4.png", "", ""))
    Slides.Add(New AjaxControlToolkit.Slide("/Images/Logos/Slide NL 5.png", "", ""))

    Dim MySlides(0) As AjaxControlToolkit.Slide
    Dim MySlide As AjaxControlToolkit.Slide
    Dim MyRandom As New Random()
    While Slides.Count > 0
        MySlide = Slides(MyRandom.Next(0, Slides.Count))
        MySlides(MySlides.Length - 1) = MySlide
        Slides.Remove(MySlide)
        If Slides.Count > 0 Then ReDim Preserve MySlides(MySlides.Length)
    End While

    Return (MySlides)

End Function

ASPX:

<table id="tblTop" runat="server" cellpadding="0" cellspacing="0" style="border-bottom: 1px solid #000000; width: 100%; height: 600px; background-image: url(/Images/Miscellaneous/Image_01.jpg); background-size: cover; background-repeat: no-repeat;">
<tr>
    <td>&nbsp;
    </td>
    <td style="width: 1100px; padding-top: 100px; vertical-align: top;">
        <table cellpadding="0" cellspacing="0" style="width: 470px;">
            <tr>
                <td style="padding-left: 0px; padding-top: 0px; padding-right: 0px;">
                    <asp:Label ID="Label1" runat="server" Text="Vanaf € 49,95 per maand onbeperkt EDI. Binnen 24 uur van start."
                        Font-Names="Interstate-Light" Font-Size="30" ForeColor="#FFFFFF" Font-Bold="true"
                        Style="text-shadow: 2px 2px #333333;" EnableTheming="false" />
                    <h1 style="font-family: Interstate-Light; font-size: 20pt; color: #000000;"></h1>
                </td>
            </tr>

它有一个旧滑块,每隔5秒就会改变一次图像,但这显然看起来并不顺畅。

0 个答案:

没有答案