Html De Bir Resime Auto Resize Etmek
-
Arkadaşlar bir html index sayfam var ancak bu sayfa desktop ta oldukça iyi ancak mobil cihazlarla girince sapıtıyor yani büyük geliyor resimler ekran dışına taşıyor. bunu çözmemin bir yolu varmı? benim aklıma auto resize geldi ancak kodunu bulamadım :(
-
<img src="..." alt=" " style="width: 100%;max-height: 100%" />
bi denermisin hocam
-
css dosyana
img {max-width:100%;}
-
CSS KODU BÖYLE OLACAK ( not: üzerine birşey yazacaksan, yok sade resim üzerinde yazı olmayacak dersen hiç uğraşma yukarıdaki yorumdaki arkadaşın dediğini yap. ama ben sadece max kısmı eklemezdim o öyle yazmış bilemiyorum)
renk falan kısmını açıklamay gerek yok sanıyorum.fixed bölümünüde. yaptığın tararıma göre biraz düzenleme gerekebilir yap hatayı söylersin
#main #hakkımda {
background-color: rgb(102,102,102);
color: rgb(255,255,255);
background-image: url(images/resim.jpg);
background-repeat: no-repeat;
background-position: center center;
display: block;
background-position-x: 50%;
background-position-y: 0px;
background-size: cover;
background-repeat-x: no-repeat;
background-repeat-y: no-repeat;
background-origin: initial;
background-clip: initial;
height:1000px;
width:100%;
padding-top: 250px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-attachment:fixed;
min-height:100%;
min-width:100%;
max-width:100%;
max-height:100%;