Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* Container for the card */
#comments-body{
margin-top:5%;
margin-left:25%;
margin-right:25%;
}
 
.card-container {
.card-container {
     display: flex;
     display: flex;
Line 13: Line 7:
     margin: 20px;
     margin: 20px;
}
}
.card {  
 
background-color: #fff;
/* The main card */
.card {
    width: 300px;
    height: 200px;
    position: relative;
    background-color: #fff;
     border: 1px solid #ddd;
     border: 1px solid #ddd;
     border-radius: 8px;
     border-radius: 8px;
    width: 300px;
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
     transition: transform 0.3s ease;
     transition: transform 0.6s ease-in-out; /* Smooth flip transition */
     overflow: hidden;
     overflow: hidden;
    transform-style: preserve-3d;
}
}


/* Hover scale effect for the card */
.card:hover {
.card:hover {
     transform: scale(1.05);
     transform: scale(1.05);
}
}


 
/* Front side of the card (before flip) */
.card img {
.card-front, .card-back {
    position: absolute;
     width: 100%;
     width: 100%;
     height: 200px;
     height: 100%;
     object-fit: cover;
     backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}
}


/* The back side of the card */
.card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}


/* Sub-panels for the back of the card */
.sub-panel {
    width: 45%;
    height: 80%;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
/* Front content of the card */
.card-content {
.card-content {
     padding: 15px;
     padding: 15px;
Line 50: Line 76:
     margin-top: 10px;
     margin-top: 10px;
}
}
.card-background{
 
background-image: url("https://www.chromengine.com/images/a/ac/ChromeEngine.png");
/* Background image for the card */
.card-background {
    background-image: url("https://www.chromengine.com/images/a/ac/ChromeEngine.png");
     background-size: cover;
     background-size: cover;
background-position: center;
    background-position: center;
}
.container {
  perspective: 1000px;
  width: 300px;
  height: 200px;
  margin: 50px;
}
}


/* The main panel */
/* Add flip effect when hovered */
.panel {
.card:hover .card-front {
  width: 100%;
    transform: rotateY(180deg); /* Flip the front side */
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease-in-out; /* Smooth transition */
}
}


/* The front side of the panel */
/* Ensure the card will be flipped back when hovered out */
.panel-front, .panel-back {
.card .card-front {
  position: absolute;
    transition: transform 0.6s ease-in-out;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
}
}


/* The back side of the panel */
/* Keyframes for the flip animation (used in case you want a more controlled animation) */
.panel-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}
 
/* Sub-panels */
.sub-panel {
  width: 45%;
  height: 80%;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}
 
/* Apply animation on hover */
.hovered {
  animation: flip 0.6s forwards; /* Trigger the flip animation */
}
 
/* Keyframes for the flip animation */
@keyframes flip {
@keyframes flip {
   0% {
   0% {
Line 117: Line 102:
     transform: rotateY(180deg); /* End position after flip */
     transform: rotateY(180deg); /* End position after flip */
   }
   }
}
.panel-front {
  background-color: #ddd;
  border: 1px solid #ccc;
}
}

Revision as of 18:51, 22 December 2024

/* Container for the card */
.card-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px;
}

/* The main card */
.card {
    width: 300px;
    height: 200px;
    position: relative;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s ease-in-out; /* Smooth flip transition */
    overflow: hidden;
    transform-style: preserve-3d;
}

/* Hover scale effect for the card */
.card:hover {
    transform: scale(1.05);
}

/* Front side of the card (before flip) */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

/* The back side of the card */
.card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

/* Sub-panels for the back of the card */
.sub-panel {
    width: 45%;
    height: 80%;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Front content of the card */
.card-content {
    padding: 15px;
}

.card-content h3 {
    margin: 0;
    font-size: 1.25em;
    color: #333;
}

.card-content p {
    color: #777;
    font-size: 0.95em;
    margin-top: 10px;
}

/* Background image for the card */
.card-background {
    background-image: url("https://www.chromengine.com/images/a/ac/ChromeEngine.png");
    background-size: cover;
    background-position: center;
}

/* Add flip effect when hovered */
.card:hover .card-front {
    transform: rotateY(180deg); /* Flip the front side */
}

/* Ensure the card will be flipped back when hovered out */
.card .card-front {
    transition: transform 0.6s ease-in-out;
}

/* Keyframes for the flip animation (used in case you want a more controlled animation) */
@keyframes flip {
  0% {
    transform: rotateY(0deg); /* Starting position */
  }
  100% {
    transform: rotateY(180deg); /* End position after flip */
  }
}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.