connectseekers.com

Wednesday, 30 March 2016

Stylish Button Using Css3 In Asp.net

3/30/2016 - By Pranav Singh 0

This article will show you how you can create a stylish button using css3 for your asp.net application.


        .buttonstyleblue
        {
            border: 2px solid #008CBA;
            background: white;
            color: black;
            padding: 16px 32px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 4px 2px;
            -webkit-transition-duration: 0.4s; /* Safari */
            transition-duration: 0.4s;
            cursor: pointer;
        }
       
        .buttonstyleblue:hover
        {
            background-color: #008CBA;
            color: white;
        }
        .buttonstylered
        {
            border: 2px solid #f44336;
            background: white;
            color: black;
            padding: 16px 32px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 4px 2px;
            -webkit-transition-duration: 0.4s; /* Safari */
            transition-duration: 0.4s;
            cursor: pointer;
        }
       
        .buttonstylered:hover
        {
            background-color: #f44336;
            color: white;
        }
        .buttonstylegreen
        {
            border: 2px solid #4CAF50;
            background: white;
            color: black;
            padding: 16px 32px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 4px 2px;
            -webkit-transition-duration: 0.4s; /* Safari */
            transition-duration: 0.4s;
            cursor: pointer;
        }
       
        .buttonstylegreen:hover
        {
            background-color: #4CAF50;
            color: white;
        }

Now here is the complete code.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="WebApplication1.WebFo
rm3" %>

<!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>Stylish Button Using Css3 In Asp.net</title>
    <style>
        .buttonstyleblue
        {
            border: 2px solid #008CBA;
            background: white;
            color: black;
            padding: 16px 32px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 4px 2px;
            -webkit-transition-duration: 0.4s; /* Safari */
            transition-duration: 0.4s;
            cursor: pointer;
        }
       
        .buttonstyleblue:hover
        {
            background-color: #008CBA;
            color: white;
        }
        .buttonstylered
        {
            border: 2px solid #f44336;
            background: white;
            color: black;
            padding: 16px 32px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 4px 2px;
            -webkit-transition-duration: 0.4s; /* Safari */
            transition-duration: 0.4s;
            cursor: pointer;
        }
       
        .buttonstylered:hover
        {
            background-color: #f44336;
            color: white;
        }
        .buttonstylegreen
        {
            border: 2px solid #4CAF50;
            background: white;
            color: black;
            padding: 16px 32px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 16px;
            margin: 4px 2px;
            -webkit-transition-duration: 0.4s; /* Safari */
            transition-duration: 0.4s;
            cursor: pointer;
        }
       
        .buttonstylegreen:hover
        {
            background-color: #4CAF50;
            color: white;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button runat="server" CssClass="buttonstyleblue" Text="Click To Save" /><br />
        <asp:Button runat="server" CssClass="buttonstylered" Text="Click To Save" /><br />
        <asp:Button runat="server" CssClass="buttonstylegreen" Text="Click To Save" /><br />
    </div>
    </form>
</body>
</html>

In this I have show you how you can create three different stylish button using css3. In this you can create ust by changing the border color of the button and hover background color.




Tags: ,
About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

0 comments:

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com
Email Id : contact@aspdotnet-pools.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Top jQuery Plugins

Global Classified : Connectseekers.com
© 2014
back to top