How do I make an html link look like a button?

后端 未结 22 809
执笔经年
执笔经年 2020-11-22 14:03

I\'m using ASP.NET, some of my buttons just do redirects. I\'d rather they were ordinary links, but I don\'t want my users to notice much difference in the appearance. I c

22条回答
  •  失恋的感觉
    2020-11-22 14:44

    If you need some cool effect, hover and shadow; you can use this:

        .button {
            text-decoration: none;
            padding: 15px 25px;
            font-size: 24px;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            outline: none;
            color: #fff;
            background-color: #450775;
            border: none;
            border-radius: 15px;
            box-shadow: 0 9px #e1d5ed;
    
        }
    
        .button:hover {background-color: #220440}
    
        .button:active {
            background-color: #230545;
            box-shadow: 0 5px #e1d5ed;
            transform: translateY(4px);
        }
    

提交回复
热议问题