簡體   English   中英

解決css文本媒體查詢

[英]resolving css text media query

我正在努力使我的文字電影、電視節目、游戲具有響應性。 我該怎么辦? 我試過媒體查詢,但我認為我弄錯了。

 <!DOCTYPE html> <html> <head> <title>Papaya | Home</title> <link href='https://fonts.googleapis.com/css?family=Luckiest+Guy' rel='stylesheet' type='text/css'> <style type="text/css"> .bg { width: 100%; height: 110%; position: absolute; top: 0; left: 0; z-index: -4000; } body{ font-family: 'Luckiest Guy', cursive;} a:hover {color: red;} a { text-decoration: none; color:white; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:focus { text-decoration: none; } a:hover, a:active { text-decoration: none; } #one { position: fixed; top:180px; left:200px; } #two { position: fixed; top:180px; left:570px; } #three { position: fixed; top:180px; left:900px; } h1{font-size:70px} } </style> </head> <body > <div id="one"> <h1><a href="movies.html" style="text-decoration:none">MOVIES</a></h1></div> <div id="two"> <h1><a href="games.html" style="text-decoration:none">GAMES</a></h1></div> <div id="three"> <h1><a href="tvshows.html" style="text-decoration:none">TV SHOWS</a></h1></div> <div align="center"><img src="images/ball.jpg" class="bg" alt="LOADING.."></div> </body> </html>

首先,編寫 HTML 和 CSS n 個單獨的文件。 它被認為是 Web 開發中的最佳實踐 ;) 然后,為網站添加響應能力的最佳方法是安裝 Bootstrap。 將其復制並粘貼到 html 文檔的頭部:

這是一個 CDN(內容交付系統)鏈接。 它將從他們的網站中提取引導功能,並允許您為您的網站添加響應能力。

這是 Bootstrap 文檔鏈接:

http://getbootstrap.com/getting-started/

我的回答可能看起來有點長和復雜,但事實並非如此。 這就是當今專業人士和公司制作現代響應式網站的方式! 希望這可以幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM