Add media query
This commit is contained in:
		| @@ -1,6 +1,7 @@ | |||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
|  |   <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||||
|   <link href="https://fonts.googleapis.com/css?family=PT+Serif&subset=cyrillic" rel="stylesheet"> |   <link href="https://fonts.googleapis.com/css?family=PT+Serif&subset=cyrillic" rel="stylesheet"> | ||||||
|   <link rel="stylesheet" type="text/css" href="/style.css"> |   <link rel="stylesheet" type="text/css" href="/style.css"> | ||||||
|   <title>Здравствуйте</title> |   <title>Здравствуйте</title> | ||||||
| @@ -9,6 +10,9 @@ | |||||||
|   <main class="content"> |   <main class="content"> | ||||||
|  |  | ||||||
|     <h1 class="greeting">Здравствуйте,</h1> |     <h1 class="greeting">Здравствуйте,</h1> | ||||||
|  |  | ||||||
|  |     <h1 class="hello">Привет,</h1> | ||||||
|  |  | ||||||
|     <p class="text"> |     <p class="text"> | ||||||
|       меня зовут Антон Вахрушев, и это моя домашняя страница.<br> |       меня зовут Антон Вахрушев, и это моя домашняя страница.<br> | ||||||
|       Здесь вы можете. |       Здесь вы можете. | ||||||
|   | |||||||
							
								
								
									
										43
									
								
								style.css
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								style.css
									
									
									
									
									
								
							| @@ -8,7 +8,8 @@ body { | |||||||
|     margin: 0 auto; |     margin: 0 auto; | ||||||
| } | } | ||||||
|  |  | ||||||
| .greeting { | .greeting, | ||||||
|  | .hello { | ||||||
|     margin-top: 1.8em; |     margin-top: 1.8em; | ||||||
|     font-size: 3.4em; |     font-size: 3.4em; | ||||||
|     margin-bottom: 0.6em; |     margin-bottom: 0.6em; | ||||||
| @@ -22,6 +23,46 @@ body { | |||||||
|     font-weight: normal; |     font-weight: normal; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .hello { | ||||||
|  |     display: none; | ||||||
|  | } | ||||||
|  |  | ||||||
| .text { | .text { | ||||||
|     margin-bottom: 0.8em; |     margin-bottom: 0.8em; | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @media (max-width: 839px) { | ||||||
|  |  | ||||||
|  |     body { | ||||||
|  |         font-size: 16px; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     .content { | ||||||
|  |         margin: 20px 0; | ||||||
|  |         width: auto; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     .greeting, | ||||||
|  |     .hello { | ||||||
|  |         margin-top: 0.8em; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     .greeting { | ||||||
|  |         display: none; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     .hello { | ||||||
|  |         display: block; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @media (max-width: 480px) { | ||||||
|  |  | ||||||
|  |     .content { | ||||||
|  |         margin: 10px 0; | ||||||
|  |         width: auto; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user