Jump to content

Background image to change orientation when in mobile mode

Recommended Posts

1 hour ago, capovelli said:

Site URL: http://capovelli.com

Hi,

In mobile mode, is it possible for the background image to change orientation. e.g Instead of horizontal change to vertical. So the background image is viewed vertically on mobile devices ?

The screenshot below shows the image horizontally, is it possible to rotate this vertically so it would match layout of most devices.

Many thanks.

 

Rotate.JPG

I think we can implement one more image block that has the vertical background. So we can set some code to hide it when you are on desktop display and visible when you are on mobile display

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 2/21/2022 at 10:17 PM, capovelli said:

How do i got about doing this ? Do i need to create another image block ?


Please let me know and again thank you for your helpe. Appriciate it!

You can add 2 images, then we will give the code to do this

Or you can add this to Design > Custom CSS to replace mobile with new image

/* Mobile third image */
@media screen and (max-width:767px) {
body.homepage .blog-basic-grid.collection-content-wrapper a[href="/home/lokibot"] img {
    content: url(https://cdn.pixabay.com/photo/2020/04/08/06/55/elephant-5015964__480.jpg);
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...

hi @tuanphan i'm trying to do a similar thing, though your code doesnt seem to work as I have the parallax effect on it. essentially in need to either change the rotation of the background texture by 90deg (while retaining the parallax) or swap the image... but i can't get neither to work!

https://www.finelinearchitecture.co.nz/ (scroll down to"our values") - view as mobile and you will see the content stack vertically, making the section much taller, making the (landscape) background image scale up to a point that it is really blurry 

Link to comment
On 12/19/2023 at 3:53 AM, nilscreates said:

hi @tuanphan i'm trying to do a similar thing, though your code doesnt seem to work as I have the parallax effect on it. essentially in need to either change the rotation of the background texture by 90deg (while retaining the parallax) or swap the image... but i can't get neither to work!

https://www.finelinearchitecture.co.nz/ (scroll down to"our values") - view as mobile and you will see the content stack vertically, making the section much taller, making the (landscape) background image scale up to a point that it is really blurry 

I have this plugin (free). You can use 2 sections, design layout for desktop/mobile, then use plugin to show 1 on desktop, show another on mobile.

What do you think?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.