asp.net - asp:imagebutton hover effect css -
I have the buttons given below so that what they should do, but I would like to add a CSS they do There can be a method of
and asp: GridView id = "GridView1" runat = "server" AllowPaging = "True" DataKeyNames = "pageID" DataSourceID = "SQLData" AutoGenerateColumn = "False" PageSize = "1" width = "100%" height = "500px" gridline = "none" ShowHeader = "False" & gt; & Lt; Columns & gt; & Lt; ASP: Boundfild Detafild = "Pejaid" Hadertakst = "Insert Pejaid" = "false" Reed Oli = "true" Sortaksresian = "Pejaid" Soheder = "false" visible = "false" / & gt; & Lt; Asp: boundfield datfilled = "sectionID" headerText = "section id" sortexpress = "section id" visible = "incorrect" ShowHeader = "False" /> & Lt; ASP: Boundfield datedfield = "no page" header text = "no page" sortExpress = "page no" visible = "wrong" ShowHeader = "False" /> & Lt; Asp: boundfield datfiled = "page title" header text = "page title" sorted expression = "page title" visible = "wrong" ShowHeader = "False" /> & Lt; Asp: TemplateField HeaderText = "pageContent" sorted expression = "page content" showheader = "false" item style-csslace = "page content" & gt; & Lt; EditItemTemplate & gt; & Lt; ASP: text box id = "text box 1" runat = "server" text = '& lt;% # bind ("page content")% & gt;' & Gt; & Lt; / Asp: text box & gt; & Lt; / EditItemTemplate & gt; & Lt; ItemTemplate & gt; & Lt; Asp: label id = "lblPageContent" runat = "server" text = '& lt;% # bind ("page content")% & gt; CssClass = "pageContent" & gt; & Lt; / ASP: Labels & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; & Lt; / Column & gt; & Lt; PagerSettings mode = "NextPrevious" NextPageImageUrl = "~ / images / navButtonNext.png" NextPageText = "Next Page" PreviousPageImageUrl = "~ / images / navButtonPrevious.png" PreviousPageText = "Previous Page" LastPageImageUrl = "images / navButtonNext.png" / & Gt; & Lt; PagerStyle CssClass = "navPager" horizontal alliance = "right" /> & Lt; PagerTemplate & gt; & Lt; Asp: ImageButton ID = "navBack" runat = "server" imageUrl = "~ / images / navigation / grey_bttn_back.jpg" CssClass = "seconds" commandname = "page" CommandArgument = "prev" ClientIDMode = "stable" AlternateText = "Back "Tooltip =" back "/> & Lt; Asp: ImageButton ID = "navHome" runat = "server" imageUrl = "~ / images / navigation / grey_bttn_up.jpg" commandname = "gotoHome" ClientIDMode = "stable" AlternateText = "home" ToolTip = "Home" / & gt; & Lt; Asp: ImageButton ID = "navFwd" runat = "server" imageUrl = "~ / images / navigation / grey_bttn_fwd.jpg" commandname = "page" CommandArgument = "next" ClientIDMode = "stable" AlternateText = "Forward" tooltip = " FWD "/> & Lt; / PagerTemplate & gt; & Lt; / ASP: GridView & gt;
You need JavaScript to do this. Share your image button in the event of mouse movement and add a square something like "hover" on the image button if the mouse is placed above it. Use your CSS to include the square in the image button.
& lt; script type = "text / javascript" & gt; Window.onload = function () {document.getElementById ("navBack"). Onmousemove = function () {this.setAttribute ('class', 'hover'); . Document.getElementById ("navHome") className = ""; . Document.getElementById ("navFwd") className = ""; } Document.getElementById ("navHome"). Onmousemove = function () {this.setAttribute ('class', 'hover'); . Document.getElementById ("navBack") className = ""; . Document.getElementById ("navFwd") className = ""; } Document.getElementById ("navFwd"). Onmousemove = function () {this.setAttribute ('class', 'hover'); . Document.getElementById ("navHome") className = ""; . Document.getElementById ("navBack") className = ""; }} & lt; / Script & gt; Note: If the mouse is not placed on them, do not forget to remove the class name from the image buttons. Use the CSS effect you want for the class "hover".
Comments
Post a Comment