Remove whitespace in HTML
P粉680087550
P粉680087550 2024-02-17 17:38:30
0
1
442

I'm just writing an "exit" button for a game client I'm making in Electron, and after writing the code for the button, a giant white bar appears next to it. I'd also like to know how to use translateX(percentage) to move it up to the top middle of the page but can't figure it out. =

.ExitButton {
  color: red;
  font-size: 25px;
  max-width: 55px;
  length: 30px;
  border-color: black;
  transition-duration: 0.4s;
  cursor: pointer;
  text-align: center;
}

.ExitButton:hover {
  background-color: black;
}

.Exitbutton {
  background-color: transparent;
}
<webview src="https://bapbap.gg"></webview>

<button class="ExitButton" onclick="alert('Are you sure you want to exit BapClient?')">Exit</button>
</button>

P粉680087550
P粉680087550

reply all(1)
P粉432906880

I think this is happening because your body tag has a white background color, try changing it with the background color of the page or you can also do the following:

.ExitButton {
/* ... */
position: absolute;
/* make the button 0 pixels away from bottom of the page */
bottom:0;
/* you can use top, left or right just like this way 
to put the button on anywhere on the page you want */
}

This will essentially give your button an absolute position and enable you to place it wherever you want. If it overlaps some elements, use z-index.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!