一步步做一个Google 网页

一步步做一个Google 网页

做一个Google 图标

其实谷歌很用心的在做每一个Google图标。然而我太懒,搞了个简单的。

h1{
font-size:100px;
color:#5f5f61;
background-color:white;
}
.google {
 text-align: center;
vertical-align:center;
text-transform:capitalize;
position:absolute;
top:25%;
left:45%;
 transform: translate(-25%, -45%);
搜索框

<坑> 此处还应该有一个放大镜和一个语音输入小图标。

.search{
 text-align: center;
padding:320px 0;
}
input[type=text] {
  width: 50%;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: 24px;
  font-size: 16px;
  background-color: white;
  background-position: 10px 10px; 
  background-repeat: no-repeat;
background-image: url('searchicon.png');
  padding: 12px 20px 12px 40px;
}
input[type=text]:focus {
  border: 3px solid #555;
 border-radius: 24px;
}
导航栏

表单只能设置一种样式;此外也可以使用div设置更多种的样式。

ul{
list-style-type:none;
position:fixed;
top:0;
width:100%;
margin:0;
padding:4px;
overflow:hidden;
background-color:#cdcdcd;
}
li {
float:right;
}
li a{
display:block;
color:white;
text-align:center;
padding:8px 8px;
}
 li a hover:(not active){
background-color:#939393;
}
.active{
background-color:#ababab;
}

使用div举例

.bottom {
overflow: hidden;
background-color: #cdcdcd;
position:fixed;
bottom:0;
width:100%;
margin:-2px;
}

.bottom a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 8px 8px;
  text-decoration: none;
}
.bottom a:hover {
  background-color: #ddd;
  color: black;
}

最后贴一下“死亡静态网站”

Google静态网页

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值