+ 7
Help me frn how to create a transparent bottom using html can and js
Help me frn how to create a transparent bottom using html css and js
4 Answers
+ 15
What do you mean by transparent bottom ?
Explain your question.
+ 3
Transparency of any element on a webpage can be achieved by setting the opacity of that element to a value that is less than 1.
In your case, if you want to place the button somewhere on a webpage but you also want the background of the page to show through it, add this css rule:
button {
opacity: 0.4;
}
Check the page, then you can adjust the opacity value up and down until you are happy with the result.
If you somehow want the button to be transparent only when users hover over it, then u can do this instead:
button:hover {
opacity: 0.4;
}
If it is more advanced scenario and you want to watch users interactions on the page not just hovering, then you will need to do that using a script language (I.e. JavaScript)
A basic code for that is like;
// when user do certain action:
var button = .......( get the button element using ID, class or tag name ...)
// then:
button.style.opacity = '0.4';
Hope that helps.
0
hello
- 1
Hell mf yeah