Styling an Input Button using “Sliding Doors”

前端 未结 3 1556
忘掉有多难
忘掉有多难 2021-01-25 07:14

I have a webpage that is using third-party HTML that I cannot change. I can however edit the CSS style sheet. I have a \"sliding-doors\" style button that I want to swap for the

3条回答
  •  逝去的感伤
    2021-01-25 07:17

    If you are able to use the button element instead of the input element. The following articles are quite useful.

    • http://jedisthlm.com/2008/03/27/flexible-css-buttons/
    • http://robertnyman.com/2008/03/13/styling-buttons-and-achieving-sliding-doors-with-them/

    You can still use type submit and post like an input does

    However, if you are relying on using this button as a submit, just beware that when using IE. it will submit the contents of the button also which will give a security exception for .net web apps.

    *Edit, found a different link as original no longer works

提交回复
热议问题