If you want to create dropdown button using CSS the follow this example code:
Try with this css code:
<style type="text/css"> a{ text-decoration: none; } a:hover{ color:#000; }ul{ background: darkorange; list-style: none; margin: 0; padding-left: 0; }li{ color: #fff; background: #056b75; display: block; float: left; padding: 1rem; position: relative; text-decoration: none; transition-duration: 0.5s; }li a { color: #f58f8f; }li:hover{ background: #ffffff; cursor: pointer; color: #000; }ul li ul { background: orange; visibility: hidden; opacity: 0; min-width: 5rem; position: absolute; transition: all 0.5s ease; margin-top: 1rem; left: 0; display: none; }ul li:hover > ul, ul li ul:hover { visibility: visible; opacity: 1; display: block; } </style>
I hope it will be helpful for you.
Question and answer is powered by AnsPress.io