html学习(2)

1.表单:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表单</title>
</head>
<body>
<form action="http://www.baidu,com">
    <!--for属性,点击文字使输入框获得焦点-->
    <div>
        <label for="username">用户名</label>
        <input type="text" name="" id="username" value="胖哥哥">
    </div>
    <br />
    <br />
    <div>
        <label>密码:&nbsp;</label>
        <input type="password" name="">
    </div>
    <br>
    <div>
        <label>性别:&nbsp;</label>
        <input type="radio" name="gender">男
        <input type="radio" name="gender">女
    </div>
    <br>
    <div>
        <label>爱好:&nbsp;</label>
        <input type="checkbox" name="like" value="play">打球
        <input type="checkbox" name="like" value="read">读书
        <input type="checkbox" name="like" value="game">游戏
    </div>
    <br>
    <div>
        <label >籍贯:&nbsp;</label>
        <select name="size">
            <option value="0">北京</option>
            <option value="1">上海</option>
            <option value="2">西安</option>
        </select>
    </div>
    <br>
    <div>
        <label>照片</label>
        <input type="file" name="file">
    </div>
    <br>
    <div>
        <label>个人描述</label>
        <textarea name="info"></textarea>
    </div>
    <input type="submit" name="post" value="提交">
    <input type="reset" name="" value="重置">
    <input type="button" name="" value="按钮">
    <input type="hidden" name="">
</form>
</body>
</html>

2.内嵌框架

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>内嵌框架</title>
</head>
<body>
<a href="http://www.baidu.com" target="myframe">百度网</a>
<a href="http://www.qq.com">qq</a>
<a href="http://www.sina.com">新浪</a><br>

<iframe name="myframe" src="http://baidu.com" width="900" height="500"
        scrolling="no" frameborder="0"></iframe>

<iframe src="表单.html" width="900" height="500"
        scrolling="no" frameborder="0"></iframe>
</body>
</html>

3.样式

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>样式</title>
    <!--内嵌式-->
    <style type="text/css">
        div{
            color:#ff0000;
            font-size:30px;
            font-family:'AR PL UKai TW';
            line-height:40px;
            text-indent: 40px;
        }

        h2{
            font: normal 30px/40px "AR PL UMing CN";
            text-align: left;
        }
        /*去下划线*/
        a{
            text-decoration: none;
        }

        /*css选择器*/
        /*id选择器 几乎不用,只能用于一个标签*/
        #div2{
            color: green;
        }

        /*类选择器 使用最多*/
        .red{
            color: gray;
        }

        /*层级选择器*/
        .duanluo{
            text-indent: 40px;
            font-size: 24px;
        }

        .duanluo em{
            font-style: normal;
            color: pink;
        }

    </style>




    <!--外联式-->
    <!--<link rel="stylesheet" type="text/css" href="css/main.css">-->
</head>
<body>

<h2>样式演示</h2>

<a href="http://www.baidu.com">百度</a>
<!--内联式-->
<div style="color: #ff0000;font-size: 30px;
font-family: 'AR PL UKai TW';line-height: 40px;">
    1.Activity生命周期: 正常流程:onCreate()-&amp;
    &gt;onStart()-&amp;gt;onResume()-&amp;
    &gt;onpause()-&amp;&gt;
    onStop()-&amp;&gt;onDestory();
    再次...
</div>

<div id="div2">
    7.进程保活:

    (1)黑色保活:不同的app进程,用广播相互唤醒(包括利用系统广播进行唤醒)

    例1:开机,网络切换,拍照,拍视频等,利用系统产生的广播进行唤醒;

    例2:接入第三方sdk也会唤醒相应的app进程;(比如启动支付宝,可能就会把淘宝唤醒)

    (2)白色保活:启动前台Service

    调用系统的api启动一个前台的Service进程

    (3)灰色保活:利用系统漏洞启动一个前台的service:

    实现思路:api<18时,启动前台Service时直接传入new Notification();

    api>=18时,同时启动两个id相同的前台Service,然后再将后启动的Service做stop处理;

    8.关于Context:提供一些程序的运行环境基础信息;
</div>

<div class="red">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈</div>

<p>
    <em>xsdaasfd</em>sddasdscsddd十大啥答案萨顶顶多多多多多多多多阿诗丹顿多多多多多多多
</p>

<p class="duanluo red">
    <em>ContextWrapper是Context的封装类</em>,其下又有三个子类,
    就是我们熟知的Application,service和ContextThemeWrapper,
    ContextThemeWrapper是一个带主题的封装类,这个可能不熟悉,
    但是Activity就是继承它的,所以总结的来说,Context有三种类型,
    分别是Application,Service和Activity,绝大多数情况下都可以通用,
    但是少数情况下不能通用,Android是不允许Activity或Dialog凭空出现,
    一个Activity的启动必须要建立在另一个Activity的基础之上,
    而Dialog则必须在一个Activity上面弹出,所以,
    当启动Activity或弹出Dialog中,必须使用Activity类型的Context;
</p>
</body>
</html>

4.例:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>菜单栏</title>
    <style>
        .menu{
            width: 694px;
            height: 50px;
            list-style: none;
            margin: 50px auto 0;
            padding: 0;
            font-size: 0;
        }
        .menu li{
            display: inline-block;
            width: 98px;
            height: 48px;
            border: 1px solid gold;
            font-size: 16px;
            margin-right: -1px;
            text-align: center;
            line-height: 48px;

        }
        .menu a{
            font-family: 'Microsoft Yahei';
            color: pink;
            text-decoration: none;
        }

        .menu li:hover{
            background-color: aqua;
        }

        .menu a:hover{
            color: red;
        }
    </style>
</head>
<body>
<ul class="menu">
    <li><a href="">首页</a> </li>
    <li><a href="">公司简介</a> </li>
    <li><a href="">公司简介</a> </li>
    <li><a href="">公司简介</a> </li>
    <li><a href="">公司简介</a> </li>
    <li><a href="">公司简介</a> </li>
</ul>
</body>
</html>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值