I'm attempting to make the button hover color transparent, but unfortunately, it's not having any effect

Check out the code snippet below. I'm attempting to adjust the button hover color to transparent. The div class is "button_container" while the button class is "btn". I made changes to the color initially, but it doesn't seem to be working. Any assistance would be greatly appreciated. Thank you in advance.

While I understand this is mostly code, I'm struggling to resolve it on my own. I have faith that the knowledgeable community here on Stack Overflow can provide some guidance. Cheers!


 .button_container {
   position: absolute;
   left: 0;
   right: 0;
   top: 30%;
 }
 .description,
 .link {
   font-family: 'Amatic SC', cursive;
   text-align: center;
 }
 .description {
   font-size: 35px;
 }
 .btn {
   line-height: 1;
   border-radius: 5px;
   align-items: center;
   align-content: space-around;
   z-index: 2;
   height: 48px;
   width: 200px;
   border: none;
   display: flex;
   text-align: -webkit-left;
   cursor: pointer;
   text-transform: uppercase;
   outline: none;
   overflow: hidden;
   position: relative;
   color: #ffffff;
   font-weight: 600;
   font-size: 0.95rem;
   background-image: linear-gradient(90deg, #70AECD 0%, #022350 100%);
   padding: 1rem 1rem 1rem 3.99rem;
   margin: -10px auto;
   box-shadow: 0 5px 15px rgb(0 0 0 / 20%);
   flex-direction: row;
   flex-wrap: wrap;
   align-content: center;
 }
 .btn span {
   position: relative;
   z-index: 1;
 }
 .btn:before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   width: 2.25rem;
   height: 100%;
   border-right: 1px solid #000000;
   padding: 119px;
 }
 .btn:before {
   content: url(https://.com/wp-content/uploads/2021/06/.png);
   position: absolute;
   top: 0%;
   left: -11.25rem;
   width: 0rem;
   height: 73%;
   -ms-transform: translateY(-50%);
   transform: translateY(-50%);
 }
 .btn:after {
   content: '';
   position: absolute;
   left: 0;
   top: 0;
   height: 858%;
   width: 347%;
   background: #ffae25;
   -webkit-transition: all .5s ease-in-out;
   transition: all .5s ease-in-out;
   -webkit-transform: translateX(-98%) translateY(-25%) rotate(37deg);
   transform: translateX(-98%) translateY(-25%) rotate(47deg);
 }
 .btn:hover:after {
   -webkit-transform: translateX(-9%) translateY(-25%) rotate(47deg);
   transform: translateX(-9%) translateY(-25%) rotate(45deg);
 }
 .link {
   font-size: 20px;
   margin-top: 30px;
 }
 .link a {
   color: #000;
   font-size: 25px;
 }
 

Answer №1

Adjusting the opacity can make the element more transparent. If you're looking to change the text color instead, just let me know. Since I don't have your HTML code, here's what I've come up with. Feel free to provide more details if needed.

.button_container {
    position: absolute;
    left: 0;
    right: 0;
    top: 30%;
}

.description, .link {
    font-family: 'Amatic SC', cursive;
    text-align: center;
}

.description {
    font-size: 35px;
}

.btn {
    line-height: 1;
    border-radius: 5px;
    align-items: center;
    align-content: space-around;
    z-index: 2;
    height: 48px;
    width: 200px;
    border: none;
    display: flex;
    text-align: -webkit-left;
    cursor: pointer;
    text-transform: uppercase;
    outline: none;
    overflow: hidden;
    position: relative;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    background-image: linear-gradient(90deg,#70AECD 0%,#022350 100%);
    padding: 1rem 1rem 1rem 3.99rem;
    margin: -10px auto;
    box-shadow: 0 5px 15px rgb(0 0 0 / 20%);
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2.25rem;
    height: 100%;
    border-right: 1px solid #000000;
    padding: 119px;
}

.btn:before {
    content: url(https://.com/wp-content/uploads/2021/06/.png);
    position: absolute;
    top: 0%;
    left: -11.25rem;
    width: 0rem;
    height: 73%;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

.btn:after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 858%;
    width: 347%;
    background: #ffae25;
    opacity: .3;
    -webkit-transition: all .5s ease-in-out;
    transition: all .5s ease-in-out;
    -webkit-transform: translateX(-98%) translateY(-25%) rotate(37deg);
    transform: translateX(-98%) translateY(-25%) rotate(47deg);
}

.btn:hover:after {
    -webkit-transform: translateX(-9%) translateY(-25%) rotate(47deg);
    transform: translateX(-9%) translateY(-25%) rotate(45deg);
    z-index: 1;
}

.link {
    font-size: 20px;
    margin-top: 30px;
}

.btn > a {
    color: #000;
    font-size: 25px;
}
<div class="button_cotainer">
    <div class="btn"><a href="#">button1</a></div>
    <div class="btn"><a href="#">button2</a></div>
    <div class="btn"><a href="#">button3</a></div>
    <div class="btn"><a href="#">button4</a></div>
<div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Maintaining a one-line CSS menu layout, the middle element is designed with two inner elements that seamlessly stack without disturbing the appearance of the menu items

I'm facing a challenge with aligning the two elements in the "inline" class - I need them stacked so that the element containing "SECURITIES" is under "A.M.S". The issue arises when I try to add a line break after the A.M.S element, which also affects ...

Converting yard values to meter values using AngularJS: A comprehensive guide

My task is to convert meter values to yard using two dropdowns. The first dropdown contains various values, while the second dropdown has "meter" and "yard" options. If "meter" is selected in the second dropdown, the values in the first dropdown remain unc ...

Save hyperlinks in a storage system

I need to store an article in a MongoDB database, and some words within the article should be clickable links leading to other pages. However, when I display the article using an EJS template, the anchor tags I added while writing the article appear as pl ...

The Django view function is failing to add new records to the database

Whenever I attempt to create a record in the FinTransDetail table as an admin, I encounter errors. This is preventing me from adding records successfully. Any assistance in resolving these issues would be greatly appreciated. Additionally, since I am unabl ...

Receiving an error when triggering an onclick event for a checkbox in TypeScript

I am creating checkboxes within a table using TypeScript with the following code: generateTable(): void { var table = document.getElementById("table1") as HTMLTableElement; if (table.childElementCount == 2) { for (var x = 0; x < 2; x++) ...

Is there an easy method to verify if the local storage is devoid of any data?

Query is named aptly; seeking to verify in a conditional statement. ...

How can I make an HTML button the default option within a form?

Currently, I am working on an asp.net page which contains a mix of asp.net buttons and HTML input[type=button] elements. These HTML buttons are specifically used to initiate AJAX calls. My dilemma arises when the user hits ENTER - instead of defaulting to ...

Welcome to the interactive homepage featuring multitouch authentication

I am looking to design a homepage that is interactive based on touch input. For instance, if the user uses 5 fingers to touch the screen, similar to the green circles in the image below, they will be redirected to a specific homepage. If they touch in a di ...

Is the meta viewport exclusively meant for mobile phones?

Is it possible to configure the general responsive meta viewport setting specifically for phones? Our website appears fine on 7" and larger tablets in both portrait and landscape modes without the meta tag, but it is a bit inconvenient on smaller devices. ...

What causes loss of focus in a React input element when it is nested inside a component?

When I have an input element connected to the React Context API, updating the value onChange works fine when the element is not nested within a component. However, if I render a different component just under the input that returns another input field conn ...

What is the best way to align a box once another one has been placed?

I have integrated both Bootstrap and Masonry plugins into my website design. The issue I am facing is that the Masonry plugin box goes under the top Bootstrap bar. I tried adding a margin-top: 50, but this resulted in a horizontal scroll bar appearing. To ...

Ensuring Data Accuracy in Angular 2 Forms

Currently, I am working on form validation using Angular 2 and encountered an issue with the error message Cannot read property 'valid' of undefined. The HTML file I am working on contains a form structure like this: <form id="commentform" c ...

Creating a dynamic dropdown menu using JQuery that does not automatically submit the form when a value is

Upon selecting a background color from the dropdown menu, I am generating a dynamic dropdown for text colors. The Text Color dropdown is populated correctly based on the selection of Background Color. Although the functionality works as intended, I encoun ...

Customize cell options in a dynamic grid within a dojo environment

When I double click on a cell in a data grid, I want to display a dropdown with information from a dojo store. However, the code I am using is not working as intended. I need to show clinician IDs stored in "clinStore" in the 'clinicianId' field ...

Is it feasible to display an image at a random position within a loop?

Is it possible to randomly position an image sourced from JSON data? I am uncertain about this. Here is a sample of what I am aiming for: https://i.sstatic.net/4AtGk.jpg This is my attempted code <div *ngFor="let item of img"></div <d ...

Is there a way to show a progress bar that functions as the background for a table row

My table is structured as follows: th1 th2 th3 th4 th5 th6 td1 td2 td3 td4 td5 td6 td1 td2 td3 td4 td5 td6 I am looking to incorporate a feature where new rows are dynamically added using a form that triggers ...

JavaScript: Automatically retrieving the if else function

I need help automating the calculation of the number of days a person worked based on their "in-time" and "out-time". I've tried to implement this in my JS code, but it's not working as expected. HTML <fieldset> In-Time: <input clas ...

The current layout of the div is hindering the ability to switch from vertical scrolling to horizontal scrolling

I'm currently utilizing this scroll converter tool to transform vertical scrolling into horizontal scrolling. However, despite correct script inclusion and initialization, the conversion is not working as expected. It seems like there might be an issu ...

Issue with multiple dropdowns not functioning in Bootstrap 5

Before you criticize my imports, here are the scripts I am using: <script src="~/lib/jquery/dist/jquery.min.js"></script> <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> <script ...

Is there a simple method to convert XML to HTML and then store the resulting HTML file?

Looking to utilize an XML file for creating HTML emails? I can create an XSL file to convert it to HTML, but am unsure how to save or copy the resulting HTML. Simply viewing the source of the XML file shows the original XML source, not the transformed HTML ...