本文介绍了如何使标签闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使标签闪烁。我使用下面的代码,但没有眨眼。





I would like know how to make a label blink. I use the following code but doesnt blink.


<asp:Label ID="Label26" runat="server" BackColor="White" Font-Bold="true"

                   Font-Size="Small" ForeColor="Red"

                   style="z-index: 1; left: 185px; top: 155px; position: absolute; text-decoration:blink; width: 135px; height: 19px; font-weight:500;"

                   Text="Please select an option"></asp:Label>





任何人都可以指导我吗?



Can anyone guide me?

推荐答案


function blinkFont()
{
  document.getElementById("blink1").style.color="red"
  setTimeout("setblinkFont()",1000)
}

function setblinkFont()
{
  document.getElementById("blink1").style.color=""
  setTimeout("blinkFont()",1000)
}





[]


<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
<style type="text/css">
.blink
{

text-decoration:blink
}
</style>

</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:LinkButton ID="lnkButton" runat="server" CssClass="blink">Blinking</asp:LinkButton>
    </div>
    </form>
</body>
</html>


这篇关于如何使标签闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 21:31
查看更多