0
تغییر اندازه صفحه وب در پلتفرم های مختلف
با سلام و خسته نباشید
چه طور میشه اندازه ی یک صفحه وب طراحی شده را متناسب با اندازه پلتفرم تغییر داد.
2 پاسخ
1
از تکنیک Responsive دیزاین بهره ببرید اگر CMS هست که قابل Responsive تهیه کنید نه اگر صفحه وب خودتون تهیه کردین از تکنیک Responsive استفاده کنید یه نمونه زیر درج میکنم
<!DOCTYPE html> <html lang="en-us"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> .city { float: left; margin: 5px; padding: 15px; max-width: 300px; height: 300px; border: 1px solid black; } </style> </head> <body> <h1>Responsive Web Design Demo</h1> <div class="city"> <h2>London</h2> <p>London is the capital city of England.</p> <p>It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p> </div> <div class="city"> <h2>Paris</h2> <p>Paris is the capital of France.</p> <p>The Paris area is one of the largest population centers in Europe, with more than 12 million inhabitants.</p> </div> <div class="city"> <h2>Tokyo</h2> <p>Tokyo is the capital of Japan.</p> <p>It is the center of the Greater Tokyo Area, and the most populous metropolitan area in the world.</p> </div> <div class="city"> <h2>New York</h2> <p>The City of New York is the most populous city in the United States.</p> <p>New York is an important center for international diplomacy and has been described as the cultural and financial capital of the world.</p> </div> </body> </html>
2
فریمورک های آماده ای برای شروع طراحی یک قالب رسپانسیو(یا واکنشگرا) هست، که بهترین اونها bootstrap هست. (موارد دیگه مثل Skeleton یا Grid System)
اگه نخواید یا نتونید از این فریمورک ها استفاده کنید، باید از کدهای سی اس اس media query استفاده کنید.
پیشنهاد من استفاده 100% از بوتسترپ هست.