modify the following code to show the images only up on complete loading. do not use…
- User
modify the following code to show the images only up on complete loading. do not use loading.. and other graphical representations, load only in the background. Also do not use any new wrapper.
import React from 'react'; import styled from 'styled-components';
const Wrapper = styled.div` position: relative; width: 100%; min-height: 100vh; background-color: #f9f9f9; padding: 0; box-sizing: border-box;
/* Apply background images */ background-image: url('/campusgoals-website-left-image.png'), url('/campusgoals-website-right-image.png'); background-repeat: no-repeat;
/* Initial background size and position */ background-position: left top, right top; background-size: 350px auto, 350px auto;
/* Add transition for smooth background size change */ transition: background-size 0.3s ease-in-out;
/* Responsive adjustments using calc() for gradual size reduction */ @media (max-width: 1200px) { background-size: calc(120px + (350 - 120) * ((100vw - 768px) / (1200 - 768))) auto, calc(120px + (350 - 120) * ((100vw - 768px) / (1200 - 768))) auto; }
@media (max-width: 992px) { background-size: calc(100px + (120 - 100) * ((100vw - 768px) / (992 - 768))) auto, calc(100px + (120 - 100) * ((100vw - 768px) / (992 - 768))) auto; }
@media (max-width: 768px) { background-image: none; /* Hide images on smaller screens */ } `;
const Content = styled.div` position: relative; width: 100%; max-width: 800px; margin: 0 auto; background-color: #ffffff; padding: 0; z-index: 1;
@media (max-width: 1024px) { max-width: 90%; } `;
const ContentWrapper = ({ children }) => { return ( {children} ); };
export default ContentWrapper;
- Assistant