+ 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

3rd Mar 2018, 5:26 AM
SUJAN - avatar
4 Answers
+ 15
What do you mean by transparent bottom ? Explain your question.
3rd Mar 2018, 8:21 AM
Swapnil Srivastava
Swapnil Srivastava - avatar
+ 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.
1st Apr 2018, 3:32 AM
Shireef Khatab
Shireef Khatab  - avatar
8th Mar 2018, 4:15 AM
Maalvika Singh
- 1
Hell mf yeah
23rd Apr 2018, 9:03 AM
Jack Adams Year 11
Jack Adams Year 11 - avatar