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">
原文地址:https://www.cnblogs.com/yan-boy/p/3286885.html