How to make a transparent HTML button?

后端 未结 6 2087
情歌与酒
情歌与酒 2020-12-23 00:33

I am using dreamweaver to create a website and I thought of just using Photoshop to create backgrounds. I decided to do so only because in case I\'d choose to change the but

6条回答
  •  情歌与酒
    2020-12-23 00:55

    The solution is pretty easy actually:

    
    

    This is doing an inline style. You're defining the border to be 1px, solid line, and black in color. The background color is then set to transparent.


    UPDATE

    Seems like your ACTUAL question is how do you prevent the border after clicking on it. That can be resolved with a CSS pseudo selector: :active.

    button {
        border: none;
        background-color: transparent;
        outline: none;
    }
    button:focus {
        border: none;
    }
    

    JSFiddle Demo

提交回复
热议问题