How to input an arrow icon within a button(如何在按钮内输入箭头图标)
转载作者:bug小助手更新时间:2023-10-25 17:52:24254
I am having a bit of difficulty adding an arrow icon within a button. I have been trying different functions and codes but haven't really gotten anywhere. I am trying to add an arrow animation that indicates to the users that this is a shortcut to the desired page.
#booking button.submit { font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; background-color: lightblue; /* sets the background color of the button */ color: black; /* sets the text color of the button */ border: none; /* removes border from the button */ border-radius: 5px; padding: 10px 20px; /* adds padding to the button */ font-size: 20px; /* sets the font size of the button */ cursor: pointer; /* changes cursor on hover to indicate button is clickable */ margin-bottom: 5px; margin-left: 30px; }
#booking button.submit:hover { color: grey; }
更多回答
It's invalid HTML to put a <button> element inside a <a> element. If you need a link that looks like a button, only use an <a> and use CSS to change the way it looks.
将元素放入元素中是无效的HTML
优秀答案推荐
You can get this animation by using this
你可以通过使用这个来获得这个动画
CSS:
Css:
button.submit { font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; background-color: lightblue; /* sets the background color of the button */ color: black; /* sets the text color of the button */ border: none; /* removes border from the button */ border-radius: 5px; padding: 10px 20px; /* adds padding to the button */ font-size: 20px; /* sets the font size of the button */ cursor: pointer; /* changes cursor on hover to indicate button is clickable */ margin-bottom: 5px; margin-left: 30px; }
so you want to make it so that when you hover over the button, the arrow rotates in the other direction? In other words, when hovered, it should look like it has the fa-angle-left class?
我是一名优秀的程序员,十分优秀!