R
R
Roman2017-09-07 17:53:02
JavaScript
Roman, 2017-09-07 17:53:02

What is the best way to add images to the site?

Hello!
I would like to know how to add images to the sites correctly . Usually, on sites (without a mobile version and not on the m. subdomain), pictures are displayed normally both on a computer (I have 21: 9, 2560x1080) and on a tablet / phone / laptop (you don’t have to look at it). How to do so?
I used to do everything in percentages, but everywhere it was stretched and displayed incorrectly. Then I switched to pixels, but then everything became miniature on my monitor. How do they deal with it?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Z
zeni1agent, 2019-05-20
@zeni1agent

Well, I was able to do it with pure css

A
Alex-1917, 2019-05-20
@alex-1917

ppc.
What is this, tabs or something? ..)))
www.jooom.ru/toster/toster_6.html

spoiler
$(document).ready ( function(){
  $('.faces_choice_area').find('span').live('click',function(){
    $(this).addClass('ch').siblings().removeClass('ch').parents('div.faces').find('span.faces_choice').eq($(this).index()).addClass('ch').siblings('span.faces_choice').removeClass('ch');
  });
});

E
Egor Zhivagin, 2017-09-07
@Krasnodar_etc

Stop. Do you know about media queries in css?

M
Maxim Timofeev, 2017-09-07
@webinar

I used to do everything in percentages, but everywhere it was stretched and displayed incorrectly

))) and if so:
img {
width:100%;
height:auto;
}

A
Alexander Sharomet, 2017-09-07
@sharomet

img {
max-width: 100%:
height: auto
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question