简体   繁体   中英

Link with Screen Resolution

I am making a website that houses an animation and the resolution is 1024x768. The link for the website will be sent out as a Holiday greeting via email. Is there a way to prevent the website from loading in a different resolution than 1024x768 regardless of their screen resolution?

Thank you!

If You want to only hide the content I would use media queries:
http://css-tricks.com/css-media-queries/

But if You have tracking pixels which You don't want to download I would insert an iframe if the screen resolution fits Your requirements:

if ( ($(window).height() === 768) && ($(window).width() === 1024) ) {
  $('body').append('<iframe src="http://your.url.com"></iframe>');
}

just embed your content in a div setting the width and height to your desired values.

But a more robust solution would be to use media queries. http://www.w3.org/TR/css3-mediaqueries/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM