User:HINK/common.css: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:


.diamond-image {
.diamond-image {
    position: relative;
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
     overflow: hidden;
     overflow: hidden;
     clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
     clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    border: 2px solid black; /* Border width and color */
    box-sizing: border-box;
}
}


.diamond-image img {
.diamond-image img {
    position: absolute;
    top: 0;
    left: 0;
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
     object-fit: cover; /* Ensures the image covers the container */
     object-fit: cover; /* Ensures the image covers the container */
}
}
.diamond-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid black; /* Border width and color */
    box-sizing: border-box;
    clip-path: inherit; /* Apply the same clipping to the border

Revision as of 21:05, 21 June 2024

.diamond-image-wrapper {
    position: relative;
    width: 150px; /* Adjust the width as needed */
    height: 150px; /* Adjust the height as needed */
    margin: 20px; /* Adjust the margin as needed */
}

.diamond-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.diamond-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the container */
}

.diamond-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid black; /* Border width and color */
    box-sizing: border-box;
    clip-path: inherit; /* Apply the same clipping to the border