Advertisement
Guest User

my first CSS examples

a guest
Jan 17th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.38 KB | None | 0 0
  1. index.html
  2. =====================
  3. <!doctype html>
  4. <html>
  5.     <head>
  6.         <title>some image effects</title>
  7.         <link rel="stylesheet" href="css/myCSS.css"/>
  8.     </head>
  9.     <body>
  10.         <header>
  11.             <img src="img\pic1.jpg" height="200"/>
  12.             <img src="img\pic2.jpg" height="200"/> 
  13.         </header>
  14.         <section>
  15.             <center><h1>This is my life</h1></center><hr><br>
  16.              some information about me and what i am doing with camels.
  17.         </section>
  18.         <aside>
  19.             <ul>
  20.                 <li>One</li>
  21.                 <li>Two</li>
  22.                 <li>Three</li>
  23.                 <li>Four</li>
  24.                 <li>Five</li>
  25.             </ul>
  26.         </aside>
  27.     </body>
  28. </html>
  29.  
  30.  
  31.  
  32. myCSS.css
  33. =====================
  34. header{
  35.     width:80%;
  36.     margin-left:10%;
  37.     height:15vh;
  38. }
  39. header>img{
  40.     height:100%;
  41.     border: 0.1em solid black;
  42.     padding: 0.5em;
  43.     border-radius: 50%;
  44. }
  45. header>img:first-child{
  46.     float: left;
  47. }
  48. header>img:last-child{
  49.     float:right;
  50. }
  51. section,aside{
  52.     height:80vh;
  53. }
  54. aside{
  55.     float: left;
  56.     background: red;
  57.     width: 20%;
  58.     border-top-right-radius: 50px;
  59.     border-bottom-right-radius: 50px;
  60. }
  61. aside li{
  62.     list-style: none;
  63.     margin-bottom: 1em;
  64. }
  65.  
  66. aside li:hover{
  67.     font-weight: bold;
  68.     cursor: pointer;
  69. }
  70. aside li:hover:after{
  71.     content: ' ';
  72.     float: left;
  73.     border-width: 0.4em;
  74.     border-color: red red red white;
  75.     border-style: solid;
  76. }
  77. section{
  78.     width:80%;
  79.     float: right;
  80.     background: cyan;
  81.     border-top-left-radius: 50px;
  82.     border-bottom-left-radius: 50px;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement