What's new

Help Notification Text Message [Pasok CSS GOD]

James_Mikes

Honorary Poster
Established
Joined
May 23, 2021
Posts
245
Reaction
90
Points
157
Hi mga ka PHC ask ko lang kung baka may naitabi kayong ganitong design basically ganito gusto ko mangyari

1. pag load nang page
2. lalabas yang parang message box sa baba nang button kasama yang parang arrow pure css sana kung pwede


pagaaralan ko lang pano ginawa 6 hours na akong nag try hindi talaga kaya nang powers

1694423380677.png




Additional:
Kung pwede one time lang siya lalabas
 

Attachments

Hello!

Sure, I can help you with that. You can achieve the desired effect using pure CSS. Here's an example of how you can implement a message box that appears when the page loads:

HTML:
HTML:
<div class="message-box">
  <button class="close-btn">&times;</button>
  <p>This is a message.</p>
</div>

CSS:
CSS:
.message-box {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  display: none;
}

.close-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.message-box p {
  margin: 0;
}

.message-box.show {
  display: block;
}

JavaScript:
JavaScript:
window.addEventListener('DOMContentLoaded', (event) => {
  const messageBox = document.querySelector('.message-box');
  const closeBtn = messageBox.querySelector('.close-btn');
  
  closeBtn.addEventListener('click', () => {
    messageBox.classList.remove('show');
  });
  
  messageBox.classList.add('show');
});

In this example, the message box is hidden by default (display: none). When the page loads, the JavaScript code adds the show class to the message box element, which makes it visible (display: block). Clicking the close button will remove the show class, hiding the message box again.

Feel free to customize the CSS to match your design requirements. Let me know if you have any further questions!
 

Similar threads

Back
Top