zoukankan      html  css  js  c++  java
  • css属性编写顺序+mysql基本操作+html细节(个人笔记)

    css属性编写顺序:

    1. 影响文档流的属性(比如:display, position, float, clear, visibility, table-layout等)
    2. 自身盒模型的属性(比如:width, height, margin, padding, border等)
    3. 排版相关属性(比如:font, line-height, text-align, text-indent, vertical-align等等)
    4. 装饰性属性(比如:color, background, opacity, cursor等)
    5. 生成内容的属性(比如:content, list-style, quotes等)

    mysql基本操作(例子):

    1. create table:CREATE TABLE recipes(ingredient VARCHAR(32), quantity VARCHAR(32), mtype VARCHAR(32), address VARCHAR(64));
    2. insert into:INSERT INTO tbl_name (col1,col2) VALUES(15,col1*2); 
    3. //增加一个新列

      alter table t2 add d timestamp;
      alter table infos add ex tinyint not null default ‘0′;

      //删除列

      alter table t2 drop column c;

      //重命名列

      alter table t1 change a b integer;

      //改变列的类型

      alter table t1 change b b bigint not null;
      alter table infos change list list tinyint not null default '0';

      //重命名表

         alter table t1 rename t2;

     mysqli基本使用(例子):

    <?php
    $mysqli = new mysqli("localhost", "my_user", "my_password", "world");

    /* check connection */
    if (mysqli_connect_errno()) {
        printf("Connect failed: %s ", mysqli_connect_error());
        exit();
    }

    $query = "SELECT Name, CountryCode FROM City ORDER by ID DESC LIMIT 50,5";

    if ($result = $mysqli->query($query)) {

        /* fetch object array */
        while ($row = $result->fetch_row()) {
            printf ("%s (%s) ", $row[0], $row[1]);
        }

        /* free result set */
        $result->close();
    }

    /* close connection */
    $mysqli->close();
    ?>

    html细节:

    1. valign属性用于td标签
    2. body背景颜色bgcolor
    3. 属性值尽量用样式来取代
    4. 使用frameset的页面不能含有body标签,基本例子如下:

      <html>
      <head>
      <title>新闻查看与管理</title>
      </head>

      <frameset rows="20%,*">
      <frame name="part1" src="part1.php"/>
      <frameset cols="25%,*">
      <frame name="part2" src="part2.php"/>
      <frame name="part3" src="part3.php"/>
      </frameset>
      </frameset>

      </html>

    5. 设定页面使用的字符集。
      用法:<meta http-equiv="content-Type" content="text/html; charset=utf-8">
  • 相关阅读:
    简述Mesos API–files
    docker-compose常用命令
    Linux命令行--使用linux环境变量(转)
    docker:从 tomcat 容器连接到 mysql 容器
    开发环境、生产环境、测试环境的基本理解和区别(转)
    Linux命令行–更多bash shell命令(转)
    docker启动Mysql(转)
    Linux命令行–基本的bash shell命令
    浅谈 man 命令的日常使用
    Linux命令行–走进shell
  • 原文地址:https://www.cnblogs.com/yan-boy/p/3286885.html
Copyright © 2011-2022 走看看