Search
 
SCRIPT & CODE EXAMPLE
 

HTML

create a close x button in html

button {
  width: 2rem;
  height: 2rem;
  padding: 0;
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

button::before,
button::after {
    content: '';
    width: 1px;
    height: 100%;
    background: #333;
    display: block;
    transform: rotate(45deg) translateX(0px);
    position: absolute;
    left: 50%;
    top: 0;
}

button::after {
    transform: rotate(-45deg) translateX(0px);
}


/* demo */
body {
  background: black;
}
.pane {
  margin: 0 auto;
  width: 50vw;
  min-height: 50vh;
  background: #FFF;
  position: relative;
  border-radius: 5px;
}
Comment

PREVIOUS NEXT
Code Example
Html :: html practice 
Html :: form action delete 
Html :: how to include icons in html 
Html :: how to set option size to select in html css 
Html :: dropdown 
Html :: html center 
Html :: How to lazily load images or load only when scrolled 
Html :: HTML Column Maker - Bootstrap 
Html :: add text to pdf footer html 
Html :: duplicate mime type text/html nginx 
Html :: dropbox embed 
Html :: how to make a head tag in html into a child element 
Html :: validate text is html format C# 
Html :: kode vidio dalam html 
Html :: button to hide and show div 
Html :: how to add horizontal line in html without css 
Html :: html cite element 
Html :: gitbook import html 
Html :: TemplateDoesNotExist at / home.html 
Html :: how to add image in odoo report 
Html :: bootstrap admin prestashop tpl tabs 
Html :: javascript toggle div 
Html :: latex in html einbinden 
Html :: desactiver un boutton react 
Html :: html header to word docx 
Html :: edit wordpress theme html 
Html :: alert before delete in anchor tag 
Html :: modpagespeed off htaccess 
Html :: html5 mode 
Html :: bootsrap loader 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =