Просмотр исходного кода

Add basic styles and 'Say hello again' button

Benoît Hubert 8 лет назад
Родитель
Сommit
cab5945af9
2 измененных файлов с 28 добавлено и 1 удалено
  1. 18 0
      css/styles.css
  2. 10 1
      index.html

+ 18 - 0
css/styles.css

@@ -0,0 +1,18 @@
+body {
+	background: #f4f4f4;
+	font-family: Arial, Helvetica;
+}
+.container {
+  margin: 150px auto;
+	background: #fff;
+	border: 1px solid #eee;
+	padding: 30px;
+	width: 600px;
+}
+button {
+  background: #24d;
+  padding: 10px;
+  color: white;
+  border: none;
+  border-radius: 3px;
+}

+ 10 - 1
index.html

@@ -13,6 +13,7 @@
 
 
         <link rel="stylesheet" href="css/normalize.css">
         <link rel="stylesheet" href="css/normalize.css">
         <link rel="stylesheet" href="css/main.css">
         <link rel="stylesheet" href="css/main.css">
+        <link rel="stylesheet" href="css/styles.css">
     </head>
     </head>
     <body>
     <body>
         <!--[if lte IE 9]>
         <!--[if lte IE 9]>
@@ -20,7 +21,10 @@
         <![endif]-->
         <![endif]-->
 
 
         <!-- Add your site or application content here -->
         <!-- Add your site or application content here -->
-        <p>Hello world! This is HTML5 Boilerplate.</p>
+        <div class="container">
+            <p>Hello world! This is HTML5 Boilerplate.</p>
+            <button onclick="sayHelloAgain()">Say hello again</button>
+        </div>
         <script src="js/vendor/modernizr-3.5.0.min.js"></script>
         <script src="js/vendor/modernizr-3.5.0.min.js"></script>
         <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
         <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
         <script>window.jQuery || document.write('<script src="js/vendor/jquery-3.2.1.min.js"><\/script>')</script>
         <script>window.jQuery || document.write('<script src="js/vendor/jquery-3.2.1.min.js"><\/script>')</script>
@@ -33,5 +37,10 @@
             ga('create','UA-XXXXX-Y','auto');ga('send','pageview')
             ga('create','UA-XXXXX-Y','auto');ga('send','pageview')
         </script>
         </script>
         <script src="https://www.google-analytics.com/analytics.js" async defer></script>
         <script src="https://www.google-analytics.com/analytics.js" async defer></script>
+        <script>
+            function sayHelloAgain() {
+                alert('Hello world!');
+            }
+        </script>
     </body>
     </body>
 </html>
 </html>