{"id":336,"date":"2024-12-28T23:33:00","date_gmt":"2024-12-28T21:33:00","guid":{"rendered":"https:\/\/html-online.com\/articles\/?p=336"},"modified":"2025-01-15T10:27:36","modified_gmt":"2025-01-15T08:27:36","slug":"gradient-background-buttons-css-html","status":"publish","type":"post","link":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/","title":{"rendered":"Gradient background button with HTML and CSS"},"content":{"rendered":"<p>Gradient background buttons with&nbsp;animated hover transition effect implemented with HTML5 and CSS3. Try the onpage demo and see the focus position of the background travelling from one side to the other.<\/p>\n<p><a class=\"gradient-button gradient-button-1\">Button 1<\/a><br \/>\n<!--more--><br \/>\n<a class=\"gradient-button gradient-button-2\">Button 2<\/a><br \/>\n<a class=\"gradient-button gradient-button-3\">Button 3<\/a><br \/>\n<a class=\"gradient-button gradient-button-4\">Button 4<\/a><\/p>\n<h2>The HTML code<\/h2>\n<p>We set four links with a common gradient button class and assign a unique class with the color style.<\/p>\n<pre style=\"background: #fff; color: #000;\"><span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">a<\/span> <span style=\"font-style: italic;\">class<\/span>=<span style=\"color: #d80800;\">\"gradient-button gradient-button-1\"<\/span>&gt;<\/span>Button 1<span style=\"color: #1c02ff;\">&lt;\/<span style=\"font-weight: bold;\">a<\/span>&gt;<\/span><span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">br<\/span> \/&gt;<\/span>\n<span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">a<\/span> <span style=\"font-style: italic;\">class<\/span>=<span style=\"color: #d80800;\">\"gradient-button gradient-button-2\"<\/span>&gt;<\/span>Button 2<span style=\"color: #1c02ff;\">&lt;\/<span style=\"font-weight: bold;\">a<\/span>&gt;<\/span><span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">br<\/span> \/&gt;<\/span>\n<span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">a<\/span> <span style=\"font-style: italic;\">class<\/span>=<span style=\"color: #d80800;\">\"gradient-button gradient-button-3\"<\/span>&gt;<\/span>Button 3<span style=\"color: #1c02ff;\">&lt;\/<span style=\"font-weight: bold;\">a<\/span>&gt;<\/span><span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">br<\/span> \/&gt;<\/span>\n<span style=\"color: #1c02ff;\">&lt;<span style=\"font-weight: bold;\">a<\/span> <span style=\"font-style: italic;\">class<\/span>=<span style=\"color: #d80800;\">\"gradient-button gradient-button-4\"<\/span>&gt;<\/span>Button 4<span style=\"color: #1c02ff;\">&lt;\/<span style=\"font-weight: bold;\">a<\/span>&gt;<\/span>\n<\/pre>\n<h2>The CSS code<\/h2>\n<p>You can adjust the style sheet below according to your needs, changing the margins, padding and font size. Use the <a href=\"https:\/\/html-css-js.com\/css\/generator\/gradient\/\" target=\"_blank\" rel=\"noopener noreferrer\">online gradient generator<\/a> to set up buttons with your own <a href=\"https:\/\/rgbcolorcode.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">color scheme<\/a>.<\/p>\n<pre style=\"background: #fff; color: #000;\"><span style=\"font-style: italic;\">.gradient-button<\/span> {\n    <span style=\"color: #6d79de; font-weight: bold;\">margin<\/span>: <span style=\"color: #cd0000; font-style: italic;\">10<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">font-family<\/span>: <span style=\"color: #d80800;\">\"Arial Black\"<\/span>, Gadget, <span style=\"color: #06960e; font-weight: bold;\">sans-serif<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">font-size<\/span>: <span style=\"color: #cd0000; font-style: italic;\">20<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">padding<\/span>: <span style=\"color: #cd0000; font-style: italic;\">15<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">text-align<\/span>: <span style=\"color: #06960e; font-weight: bold;\">center<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">text-transform<\/span>: <span style=\"color: #06960e; font-weight: bold;\">uppercase<\/span>;\n    transition: <span style=\"color: #cd0000; font-style: italic;\">0.5<span style=\"color: #0100b6; font-weight: bold;\">s<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">background<\/span>-<span style=\"color: #6d79de; font-weight: bold;\">size<\/span>: <span style=\"color: #cd0000; font-style: italic;\">200<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span> <span style=\"color: #06960e; font-weight: bold;\">auto<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">color<\/span>: <span style=\"color: #c5060b; font-style: italic;\">#FFF<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">box-shadow<\/span>: <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">20<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #c5060b; font-style: italic;\">#eee<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">border-radius<\/span>: <span style=\"color: #cd0000; font-style: italic;\">10<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">width<\/span>: <span style=\"color: #cd0000; font-style: italic;\">200<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">box-shadow<\/span>: <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">1<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">3<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #3c4c72; font-weight: bold;\">rgba<\/span>(<span style=\"color: #c5060b; font-style: italic;\">0,0,0,0.12<\/span>), <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">1<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">2<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #3c4c72; font-weight: bold;\">rgba<\/span>(<span style=\"color: #c5060b; font-style: italic;\">0,0,0,0.24<\/span>);\n    transition: <span style=\"color: #06960e; font-weight: bold;\">all<\/span> <span style=\"color: #cd0000; font-style: italic;\">0.3<span style=\"color: #0100b6; font-weight: bold;\">s<\/span><\/span> cubic-bezier(<span style=\"color: #cd0000; font-style: italic;\">.25<\/span>,<span style=\"color: #cd0000; font-style: italic;\">.8<\/span>,<span style=\"color: #cd0000; font-style: italic;\">.25<\/span>,<span style=\"color: #cd0000; font-style: italic;\">1<\/span>);\n    <span style=\"color: #6d79de; font-weight: bold;\">cursor<\/span>: <span style=\"color: #06960e; font-weight: bold;\">pointer<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">display<\/span>: <span style=\"color: #06960e; font-weight: bold;\">inline-block<\/span>;\n    <span style=\"color: #6d79de; font-weight: bold;\">border-radius<\/span>: <span style=\"color: #cd0000; font-style: italic;\">25<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n}\n<span style=\"font-style: italic;\">.gradient-button<\/span><span style=\"font-style: italic;\">:hover<\/span>{\n    <span style=\"color: #6d79de; font-weight: bold;\">box-shadow<\/span>: <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">10<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">20<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #3c4c72; font-weight: bold;\">rgba<\/span>(<span style=\"color: #c5060b; font-style: italic;\">0,0,0,0.19<\/span>), <span style=\"color: #cd0000; font-style: italic;\">0<\/span> <span style=\"color: #cd0000; font-style: italic;\">6<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">6<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #3c4c72; font-weight: bold;\">rgba<\/span>(<span style=\"color: #c5060b; font-style: italic;\">0,0,0,0.23<\/span>);\n    <span style=\"color: #6d79de; font-weight: bold;\">margin<\/span>: <span style=\"color: #cd0000; font-style: italic;\">8<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">10<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span> <span style=\"color: #cd0000; font-style: italic;\">12<span style=\"color: #0100b6; font-weight: bold;\">px<\/span><\/span>;\n}\n<span style=\"font-style: italic;\">.gradient-button-1<\/span> {<span style=\"color: #6d79de; font-weight: bold;\">background-image<\/span>: linear-gradient(to <span style=\"color: #06960e; font-weight: bold;\">right<\/span>, <span style=\"color: #c5060b; font-style: italic;\">#DD5E89<\/span> <span style=\"color: #cd0000; font-style: italic;\">0<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>, <span style=\"color: #c5060b; font-style: italic;\">#F7BB97<\/span> <span style=\"color: #cd0000; font-style: italic;\">51<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>, <span style=\"color: #c5060b; font-style: italic;\">#DD5E89<\/span> <span style=\"color: #cd0000; font-style: italic;\">100<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>)}\n<span style=\"font-style: italic;\">.gradient-button-1<\/span><span style=\"font-style: italic;\">:hover<\/span> { <span style=\"color: #6d79de; font-weight: bold;\">background-position<\/span>: <span style=\"color: #06960e; font-weight: bold;\">right<\/span> <span style=\"color: #06960e; font-weight: bold;\">center<\/span>; }\n\n<span style=\"font-style: italic;\">.gradient-button-2<\/span> {<span style=\"color: #6d79de; font-weight: bold;\">background-image<\/span>: linear-gradient(to <span style=\"color: #06960e; font-weight: bold;\">right<\/span>, <span style=\"color: #c5060b; font-style: italic;\">#2BC0E4<\/span> <span style=\"color: #cd0000; font-style: italic;\">0<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>, <span style=\"color: #c5060b; font-style: italic;\">#EAECC6<\/span> <span style=\"color: #cd0000; font-style: italic;\">51<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>, <span style=\"color: #c5060b; font-style: italic;\">#2BC0E4<\/span> <span style=\"color: #cd0000; font-style: italic;\">100<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>)}\n<span style=\"font-style: italic;\">.gradient-button-2<\/span><span style=\"font-style: italic;\">:hover<\/span> { <span style=\"color: #6d79de; font-weight: bold;\">background-position<\/span>: <span style=\"color: #06960e; font-weight: bold;\">right<\/span> <span style=\"color: #06960e; font-weight: bold;\">center<\/span>; }\n\n<span style=\"font-style: italic;\">.gradient-button-3<\/span> {<span style=\"color: #6d79de; font-weight: bold;\">background-image<\/span>: linear-gradient(to <span style=\"color: #06960e; font-weight: bold;\">right<\/span>, <span style=\"color: #c5060b; font-style: italic;\">#7474BF<\/span> <span style=\"color: #cd0000; font-style: italic;\">0<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>, <span style=\"color: #c5060b; font-style: italic;\">#348AC7<\/span> <span style=\"color: #cd0000; font-style: italic;\">51<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>, <span style=\"color: #c5060b; font-style: italic;\">#7474BF<\/span> <span style=\"color: #cd0000; font-style: italic;\">100<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>)}\n<span style=\"font-style: italic;\">.gradient-button-3<\/span><span style=\"font-style: italic;\">:hover<\/span> { <span style=\"color: #6d79de; font-weight: bold;\">background-position<\/span>: <span style=\"color: #06960e; font-weight: bold;\">right<\/span> <span style=\"color: #06960e; font-weight: bold;\">center<\/span>; }\n\n<span style=\"font-style: italic;\">.gradient-button-4<\/span> {<span style=\"color: #6d79de; font-weight: bold;\">background-image<\/span>: linear-gradient(to <span style=\"color: #06960e; font-weight: bold;\">right<\/span>, <span style=\"color: #c5060b; font-style: italic;\">#00d2ff<\/span> <span style=\"color: #cd0000; font-style: italic;\">0<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>, <span style=\"color: #c5060b; font-style: italic;\">#3a7bd5<\/span> <span style=\"color: #cd0000; font-style: italic;\">51<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>, <span style=\"color: #c5060b; font-style: italic;\">#00d2ff<\/span> <span style=\"color: #cd0000; font-style: italic;\">100<span style=\"color: #0100b6; font-weight: bold;\">%<\/span><\/span>)}\n<span style=\"font-style: italic;\">.gradient-button-4<\/span><span style=\"font-style: italic;\">:hover<\/span> { <span style=\"color: #6d79de; font-weight: bold;\">background-position<\/span>: <span style=\"color: #06960e; font-weight: bold;\">right<\/span> <span style=\"color: #06960e; font-weight: bold;\">center<\/span>; }\n<\/pre>\n<p>And finally a screenshot image with the buttons for those who use outdated web browsers which don&#8217;t support CSS3 but still want to see how these gradient buttons look like:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg\" alt=\"gradient background buttons hover\"><\/p>\n<h2>Useful tip<\/h2>\n<p>The <a href=\"https:\/\/htmlcheatsheet.com\/css\/\" target=\"_blank\" rel=\"noopener noreferrer\">CSS Cheat Sheet has its own button generator<\/a> where you can set up the styles of your button in an interactive interface.<\/p>\n<p>Look for the panel pictured below to adjust color, size, padding, radius and change the remaining features like gradient, shadows, font and border int other panels:<\/p>\n<p><a href=\"https:\/\/htmlcheatsheet.com\/css\/\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/css-button-generator.jpg\" alt=\"css button generator\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gradient background buttons with&nbsp;animated hover transition effect implemented with HTML5 and CSS3. Try the onpage demo and see the focus position of the background travelling from one side to the other. Button 1<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2,3,4],"tags":[],"class_list":["post-336","post","type-post","status-publish","format-standard","hentry","category-articles","category-css","category-freebies","category-html"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Gradient background buttons with HTML and CSS<\/title>\n<meta name=\"description\" content=\"Gradient background buttons with animated hover transition effect implemented with HTML5 and CSS3. Try the onpage demo!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gradient background buttons with HTML and CSS\" \/>\n<meta property=\"og:description\" content=\"Gradient background buttons with animated hover transition effect implemented with HTML5 and CSS3. Try the onpage demo!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/\" \/>\n<meta property=\"og:site_name\" content=\"HTML Online\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/htmlcoding\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-28T21:33:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-15T08:27:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg\" \/>\n<meta name=\"author\" content=\"HTML Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"HTML Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/\"},\"author\":{\"name\":\"HTML Editor\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d\"},\"headline\":\"Gradient background button with HTML and CSS\",\"datePublished\":\"2024-12-28T21:33:00+00:00\",\"dateModified\":\"2025-01-15T08:27:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/\"},\"wordCount\":183,\"publisher\":{\"@id\":\"https:\/\/html-online.com\/articles\/#organization\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg\",\"articleSection\":[\"Articles\",\"CSS\",\"Freebies\",\"HTML\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/\",\"url\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/\",\"name\":\"Gradient background buttons with HTML and CSS\",\"isPartOf\":{\"@id\":\"https:\/\/html-online.com\/articles\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg\",\"datePublished\":\"2024-12-28T21:33:00+00:00\",\"dateModified\":\"2025-01-15T08:27:36+00:00\",\"description\":\"Gradient background buttons with animated hover transition effect implemented with HTML5 and CSS3. Try the onpage demo!\",\"breadcrumb\":{\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#primaryimage\",\"url\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg\",\"contentUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg\",\"width\":267,\"height\":316,\"caption\":\"gradient background buttons hover\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/html-online.com\/articles\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gradient background button with HTML and CSS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/html-online.com\/articles\/#website\",\"url\":\"https:\/\/html-online.com\/articles\/\",\"name\":\"HTML Online Articles\",\"description\":\"Tips, tricks, tutorials\u2026\",\"publisher\":{\"@id\":\"https:\/\/html-online.com\/articles\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/html-online.com\/articles\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/html-online.com\/articles\/#organization\",\"name\":\"HTML Online\",\"url\":\"https:\/\/html-online.com\/articles\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg\",\"contentUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg\",\"width\":350,\"height\":350,\"caption\":\"HTML Online\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/htmlcoding\/\",\"https:\/\/www.linkedin.com\/in\/ferencdenes\/\",\"https:\/\/www.youtube.com\/channel\/UCn38Jw1sJzbjVHO95Zp0Sww\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d\",\"name\":\"HTML Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g\",\"caption\":\"HTML Editor\"},\"description\":\"In 2013, while wrestling with a mountain of client articles and an uncooperative CMS, I decided enough was enough. So, I created an online HTML editor purely out of necessity (and mild frustration). What began as a tool for my own sanity quickly evolved into a gift for the world\u2014or at least for anyone trying to avoid breaking their website's code. Since then, I've shared my tech notes on my blog, which serves as both a handy reference and a digital diary of the adventures and misadventures of a coder.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/ferencdenes\/\",\"https:\/\/www.youtube.com\/@htmlg\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Gradient background buttons with HTML and CSS","description":"Gradient background buttons with animated hover transition effect implemented with HTML5 and CSS3. Try the onpage demo!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/","og_locale":"en_GB","og_type":"article","og_title":"Gradient background buttons with HTML and CSS","og_description":"Gradient background buttons with animated hover transition effect implemented with HTML5 and CSS3. Try the onpage demo!","og_url":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/","og_site_name":"HTML Online","article_publisher":"https:\/\/www.facebook.com\/htmlcoding\/","article_published_time":"2024-12-28T21:33:00+00:00","article_modified_time":"2025-01-15T08:27:36+00:00","og_image":[{"url":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg","type":"","width":"","height":""}],"author":"HTML Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"HTML Editor","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#article","isPartOf":{"@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/"},"author":{"name":"HTML Editor","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d"},"headline":"Gradient background button with HTML and CSS","datePublished":"2024-12-28T21:33:00+00:00","dateModified":"2025-01-15T08:27:36+00:00","mainEntityOfPage":{"@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/"},"wordCount":183,"publisher":{"@id":"https:\/\/html-online.com\/articles\/#organization"},"image":{"@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#primaryimage"},"thumbnailUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg","articleSection":["Articles","CSS","Freebies","HTML"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/","url":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/","name":"Gradient background buttons with HTML and CSS","isPartOf":{"@id":"https:\/\/html-online.com\/articles\/#website"},"primaryImageOfPage":{"@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#primaryimage"},"image":{"@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#primaryimage"},"thumbnailUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg","datePublished":"2024-12-28T21:33:00+00:00","dateModified":"2025-01-15T08:27:36+00:00","description":"Gradient background buttons with animated hover transition effect implemented with HTML5 and CSS3. Try the onpage demo!","breadcrumb":{"@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#primaryimage","url":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg","contentUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2017\/09\/gradient-background-buttons-css-html.jpg","width":267,"height":316,"caption":"gradient background buttons hover"},{"@type":"BreadcrumbList","@id":"https:\/\/html-online.com\/articles\/gradient-background-buttons-css-html\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/html-online.com\/articles\/"},{"@type":"ListItem","position":2,"name":"Gradient background button with HTML and CSS"}]},{"@type":"WebSite","@id":"https:\/\/html-online.com\/articles\/#website","url":"https:\/\/html-online.com\/articles\/","name":"HTML Online Articles","description":"Tips, tricks, tutorials\u2026","publisher":{"@id":"https:\/\/html-online.com\/articles\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/html-online.com\/articles\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/html-online.com\/articles\/#organization","name":"HTML Online","url":"https:\/\/html-online.com\/articles\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/","url":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg","contentUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg","width":350,"height":350,"caption":"HTML Online"},"image":{"@id":"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/htmlcoding\/","https:\/\/www.linkedin.com\/in\/ferencdenes\/","https:\/\/www.youtube.com\/channel\/UCn38Jw1sJzbjVHO95Zp0Sww"]},{"@type":"Person","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d","name":"HTML Editor","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g","caption":"HTML Editor"},"description":"In 2013, while wrestling with a mountain of client articles and an uncooperative CMS, I decided enough was enough. So, I created an online HTML editor purely out of necessity (and mild frustration). What began as a tool for my own sanity quickly evolved into a gift for the world\u2014or at least for anyone trying to avoid breaking their website's code. Since then, I've shared my tech notes on my blog, which serves as both a handy reference and a digital diary of the adventures and misadventures of a coder.","sameAs":["https:\/\/www.linkedin.com\/in\/ferencdenes\/","https:\/\/www.youtube.com\/@htmlg"]}]}},"_links":{"self":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/comments?post=336"}],"version-history":[{"count":3,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/336\/revisions"}],"predecessor-version":[{"id":1157,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/336\/revisions\/1157"}],"wp:attachment":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/media?parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/categories?post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/tags?post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}