trianglespace Posted November 8 Share Posted November 8 Hi, I currently have an animation in my navigation bar that shows the underline as an animation when hovering over an option. I am using this code below: /* Navigation Hyperlink Animation */ .header-nav-item { a { text-decoration: none !important; background-image: none !important; position: relative; } a:after { content: ""; background: currentColor; height: 1px; width: 0; display: inline-block; position: absolute; bottom: 0; left: 0; -webkit-transition: all 0.3s; -o-transition: all 0.3s; transition: all 0.3s; } a:hover:after { width: 100%; -webkit-transition: all 0.3s; -o-transition: all 0.3s; transition: all 0.3s; } } How can I implelement this same feature but have it work for all hyperlinks on all pages? Thanks 🙂 Link to comment
Solution Web_Solutions Posted November 8 Solution Share Posted November 8 3 hours ago, trianglespace said: Hi, I currently have an animation in my navigation bar that shows the underline as an animation when hovering over an option. I am using this code below: /* Navigation Hyperlink Animation */ .header-nav-item { a { text-decoration: none !important; background-image: none !important; position: relative; } a:after { content: ""; background: currentColor; height: 1px; width: 0; display: inline-block; position: absolute; bottom: 0; left: 0; -webkit-transition: all 0.3s; -o-transition: all 0.3s; transition: all 0.3s; } a:hover:after { width: 100%; -webkit-transition: all 0.3s; -o-transition: all 0.3s; transition: all 0.3s; } } How can I implelement this same feature but have it work for all hyperlinks on all pages? Thanks 🙂 Replace the code with the code below .header-nav-item, h1, h2, h3, h4, p { a { text-decoration: none !important; background-image: none !important; position: relative; } a:after { content: ""; background: currentColor; height: 1px; width: 0; display: inline-block; position: absolute; bottom: 0; left: 0; -webkit-transition: all 0.3s; -o-transition: all 0.3s; transition: all 0.3s; } a:hover:after { width: 100%; -webkit-transition: all 0.3s; -o-transition: all 0.3s; transition: all 0.3s; } } trianglespace 1 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
trianglespace Posted November 9 Author Share Posted November 9 @Web_Solutions Thank you! This worked :) Link to comment
trianglespace Posted November 9 Author Share Posted November 9 @Web_Solutions Would it be possible to implement this same functionality when hovering over images? For example, on this page, when you hover over an image, it will underline the corresponding name, but it isn't animated. Can this be animated too? An example of the code for how this works: .fe-block-17923ee30e4b127c491c:hover ~ .fe-block-81fb5c488a4c1e3f8586 h4 a { border-bottom: 1px solid; } Thanks :) Link to comment
Web_Solutions Posted November 9 Share Posted November 9 (edited) 6 hours ago, trianglespace said: @Web_Solutions Would it be possible to implement this same functionality when hovering over images? For example, on this page, when you hover over an image, it will underline the corresponding name, but it isn't animated. Can this be animated too? An example of the code for how this works: .fe-block-17923ee30e4b127c491c:hover ~ .fe-block-81fb5c488a4c1e3f8586 h4 a { border-bottom: 1px solid; } Thanks 🙂 I have posted the solution here Edited November 9 by Web_Solutions trianglespace and Ainul 2 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment