Using an image as a submit button

后端 未结 4 1086
慢半拍i
慢半拍i 2020-12-15 10:58

If I want to make my own clickable buttons, I can do this:

Sign up

Where CSS rule

4条回答
  •  青春惊慌失措
    2020-12-15 11:20

    It's easy enough, to use an :

    input[type=submit] {
        background: transparent url("path/to/image.jpg") 0 0 no-repeat;
        font-weight: bold;
        display: inline-block;
        text-align: center;
        cursor: pointer;
        height: 331px; /* height of the background image */
        width: 500px; /* width of the background image */
        border: 5px solid #fff;
        border-radius: 4em;
    }
    

    JS Fiddle demo.

提交回复
热议问题