Web进阶:Day5 移动适配、rem、less

news2024/10/6 10:27:53

Web进阶:Day5

Date: January 10, 2023
Summary: 移动适配、rem、less


移动适配

移动适配指网页元素的宽高都要随着设备宽度等比缩放

Untitled

rem : 目前多数企业在用的解决方案

vw / vh:未来的解决方案



rem

目标:能够使用rem单位设置网页元素的尺寸

网页效果

屏幕宽度不同,网页元素尺寸不同(等比缩放)

px单位或百分比布局可以实现吗?

px单位是绝对单位

百分比布局特点宽度自适应,高度固定

适配方案

rem

vw / vh

rem单位

相对单位

rem单位是相对于HTML标签的字号计算结果

1rem = 1HTML字号大小


rem移动适配

思考

  1. 手机屏幕大小不同,分辨率不同, 如何设置不同的HTML标签字号?

  2. 设备宽度不同,HTML标签字号设置多少合适?


媒体查询

目标:能够使用媒体查询设置差异化CSS样式

思考:

手机屏幕大小不同,分辨率不同, 如何设置不同的HTML标签字号?

采用媒体查询

媒体查询能够检测视口的宽度,然后编写差异化的 CSS 样式

当某个条件成立, 执行对应的CSS样式

写法

Untitled


目标:能够使用rem单位设置网页元素的尺寸

思考:

手机屏幕大小不同,分辨率不同, 如何设置不同的HTML标签字号?

设备宽度不同,HTML标签字号设置多少合适?

设备宽度大, 元素尺寸大

设备宽度小,元素尺寸小

Untitled

目前rem布局方案中,将网页等分成10份, HTML标签的字号为视口宽度的 1/10

Untitled


目标:实现在不同宽度的设备中,网页元素尺寸等比缩放效果

思考:

工作中,书写代码的尺寸要参照设计稿尺寸,设计稿中是px还是rem?

如何确定rem的数值?

Untitled


rem适配原理

rem单位尺寸

  1. 根据视口宽度,设置不同的HTML标签字号

  2. 书写代码,尺寸是rem单位

2.1 确定设计稿对应的设备的HTML标签字号

查看设计稿宽度 → 确定参考设备宽度(视口宽度) → 确定基准根字号(1/10视口宽度)

2.2 rem单位的尺寸

N * 37.5 = 68 → N = 68 / 37.5

rem单位的尺寸 = px单位数值 / 基准根字号


flexible.js

目标:使用flexible js配合rem实现在不同宽度的设备中,网页元素尺寸等比缩放效果

思考:咱们检测了3个视口,分别设置了根字号,有什么弊端吗?

答:手机设备多,屏幕尺寸不一,视口不仅仅有这3个

Untitled


flexible.js是手淘开发出的一个用来适配移动端的js框架。

核心原理就是根据不同的视口宽度给网页中html根节点设置不同的font-size

Untitled



less

目标:使用Less运算写法完成px单位到rem单位的转换

思考:在px单位转换到rem单位过程中,哪项工作是最麻烦的?

答:除法运算。CSS不支持计算写法。

解决方案:可以通过Less实现。


目标:使用Less语法快速编译生成CSS代码

概念:

Less是一个CSS预处理器, Less文件后缀是**.less**

扩充了 CSS 语言, 使 CSS 具备一定的逻辑性、计算能力。

注意:浏览器不识别Less代码,目前阶段,网页要引入对应的CSS文件。

Easy Less :

vscode插件

作用:less文件保存自动生成css文件

Untitled



语法:

注释:

单行注释

语法:// 注释内容

快捷键:ctrl + /

块注释

语法:/* 注释内容 */

快捷键: ctrl + shift + /

注意:less只能把多行注释渲染到css中去

Untitled


运算:

加、减、乘直接书写计算表达式

除法需要添加 小括号 或 .

多用小括号,用.会报警告

注意:

  1. 表达式存在多个单位以第一个单位为准
  2. less4.0版本之前除法不用小括号或者.

案例:

.box {
    width: 100 + 10px;
    width: 100 - 20px;
    width: 100 * 2px;

    // 除法
    // 68  > rem
    width: (68 / 37.5rem);
    // height: 29 ./ 37.5rem;

    height: 29 / 37.5rem;

}

嵌套:

目标:能够使用Less嵌套写法生成后代选择器

思考:书写CSS选择器时, 如何避免样式冲突?

.father {
  width: 100px;
}
.father .son {
  color: pink;
}
.father .son:hover {
  color: green;
}
.father:hover {
  color: orange;
}

嵌套:

作用:快速生成后代选择器。

语法:

Untitled

注意:&不生成后代选择器,表示当前选择器,通常配合伪类或伪元素使用

Untitled

案例:

.father {
    width: 100px;
    .son {
        color: pink;
        // & 表示当前选择器
        &:hover {
            color: green;
        }
    }

    &:hover {
        color: orange;
    }
}

// .father:hover {}

变量:

目标:能够使用Less变量设置属性值

思考:

网页中, 文字文字颜色基本都是统一的, 如果网站改版,变换文字颜色, 如何修改代码?

方法一:逐一修改属性值(太繁琐)

方法二: 把颜色提前存储到一个容器,设置属性值为这个容器名

变量

变量:存储数据,方便使用和修改。

语法:

定义变量:@变量名: 值;

使用变量:CSS属性:@变量名;

案例:

// 1. 定义. 2.使用
@colora:green;

.box {
    color: @colora;
}

.father {
    background-color: @colora;
}

.aa {
    color: @colora;
}

导入/出文件:

目标:能够使用Less导入写法引用其他Less文件

思考:

开发网站时,网页如何引入公共样式?

CSS:书写link标签

Less:导入

导入: @import “文件路径”;

案例:

@import './01-体验less.less';
@import './02-注释';

Untitled


目标:使用Less语法导出CSS文件

思考:

目前,Less文件导出的CSS文件位置是哪里?

Untitled

方法一:

配置EasyLess插件, 实现所有Less有相同的导出路径

配置插件: 设置 → 搜索EasyLess → 在setting.json中编辑 → 添加代码(注意,必须是双引号)

Untitled

方法二:控制当前Less文件导出路径

Less文件第一行添加如下代码, 注意文件夹名称后面添加 /

// out: ./qqq/daqiu.css

// out: ./abc/

禁止导出

思考:所有的Less文件都需要导出CSS文件吗?

Untitled

答:我们可以通过import导入其他less文件

在less文件第一行添加: // out: false

// out: false


项目演练

目标:实现在不同宽度设备中等比缩放的网页效果

Untitled

准备工作:项目目录及文件

根目录(paradise / FC)

Untitled

整体布局:网页为灰色背景色

主体内容

底部间距(高度与工具栏相同)

底部工具栏

固定定位

尺寸

背景色

注意:需要设置基准根字号 @rootSize: 37.5;

  • Code:

    base.less

    // out:false
    @charset 'UTF-8';
    
    * {
      // -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    
    body, ul, p, h3, h4, h5, h6 {
      padding: 0;
      margin: 0;
    }
    
    body {
      font-family: Arial, Helvetica, sans-serif;
      -webkit-text-size-adjust: none;
      text-size-adjust: none;
      -webkit-user-select: none;
      user-select: none;
    }
    
    img {
      display: block;
      max-width: 100%;
    }
    
    ul {
      list-style-type: none;
    }
    
    a {
      text-decoration: none;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    

    index.less

    @import './base';
    @import './normalize';
    
    // 变量: 存储37.5
    @rootSize: 37.5rem;
    
    body {
        background-color: #F0F0F0;
    }
    
    // 主体内容
    .main {
        // padding-bottom: (50 / 37.5rem);
        padding-bottom: (50 / @rootSize);
        
        // banner
        .banner {
            height: (160 / @rootSize);
        }
    
        // 活动标题
        .title {
            height: (40 / @rootSize);
            line-height: (40 / @rootSize);
            padding-left: (15 / @rootSize);
            h4 {
                font-size: (14 / @rootSize);
                color: #3C3C3C;
            }
        }
    
        // 活动
        .item {
            margin-bottom: (10 / @rootSize);
    
            // 图
            .pic {
                height: (160 / @rootSize);
            }
    
            // 文字
            .txt {
                padding: (10 / @rootSize) (15 / @rootSize);
                background-color: #fff;
            }
        }
    }
    
    // 底部工具栏
    footer {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        // height: (50 / 37.5rem);
        height: (50 / @rootSize);
        background-color: #FECA49;
    }
    

    normalize.less

    // out:false
    /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
    
    /**
     * 1. Change the default font family in all browsers (opinionated).
     * 2. Correct the line height in all browsers.
     * 3. Prevent adjustments of font size after orientation changes in
     *    IE on Windows Phone and in iOS.
     */
    
    /* Document
       ========================================================================== */
    @charset 'UTF-8';
    
    html {
      font-family: sans-serif; /* 1 */
      line-height: 1.15; /* 2 */
      -ms-text-size-adjust: 100%; /* 3 */
      -webkit-text-size-adjust: 100%; /* 3 */
    }
    
    /* Sections
       ========================================================================== */
    
    /**
     * Remove the margin in all browsers (opinionated).
     */
    
    body {
      margin: 0;
    }
    
    /**
     * Add the correct display in IE 9-.
     */
    
    article,
    aside,
    footer,
    header,
    nav,
    section {
      display: block;
    }
    
    /**
     * Correct the font size and margin on `h1` elements within `section` and
     * `article` contexts in Chrome, Firefox, and Safari.
     */
    
    h1 {
      font-size: 2em;
      margin: 0.67em 0;
    }
    
    /* Grouping content
       ========================================================================== */
    
    /**
     * Add the correct display in IE 9-.
     * 1. Add the correct display in IE.
     */
    
    figcaption,
    figure,
    main { /* 1 */
      display: block;
    }
    
    /**
     * Add the correct margin in IE 8.
     */
    
    figure {
      margin: 1em 40px;
    }
    
    /**
     * 1. Add the correct box sizing in Firefox.
     * 2. Show the overflow in Edge and IE.
     */
    
    hr {
      box-sizing: content-box; /* 1 */
      height: 0; /* 1 */
      overflow: visible; /* 2 */
    }
    
    /**
     * 1. Correct the inheritance and scaling of font size in all browsers.
     * 2. Correct the odd `em` font sizing in all browsers.
     */
    
    pre {
      font-family: monospace, monospace; /* 1 */
      font-size: 1em; /* 2 */
    }
    
    /* Text-level semantics
       ========================================================================== */
    
    /**
     * 1. Remove the gray background on active links in IE 10.
     * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
     */
    
    a {
      background-color: transparent; /* 1 */
      -webkit-text-decoration-skip: objects; /* 2 */
    }
    
    /**
     * Remove the outline on focused links when they are also active or hovered
     * in all browsers (opinionated).
     */
    
    a:active,
    a:hover {
      outline-width: 0;
    }
    
    /**
     * 1. Remove the bottom border in Firefox 39-.
     * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
     */
    
    abbr[title] {
      border-bottom: none; /* 1 */
      text-decoration: underline; /* 2 */
      text-decoration: underline dotted; /* 2 */
    }
    
    /**
     * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
     */
    
    b,
    strong {
      font-weight: inherit;
    }
    
    /**
     * Add the correct font weight in Chrome, Edge, and Safari.
     */
    
    b,
    strong {
      font-weight: bolder;
    }
    
    /**
     * 1. Correct the inheritance and scaling of font size in all browsers.
     * 2. Correct the odd `em` font sizing in all browsers.
     */
    
    code,
    kbd,
    samp {
      font-family: monospace, monospace; /* 1 */
      font-size: 1em; /* 2 */
    }
    
    /**
     * Add the correct font style in Android 4.3-.
     */
    
    dfn {
      font-style: italic;
    }
    
    /**
     * Add the correct background and color in IE 9-.
     */
    
    mark {
      background-color: #ff0;
      color: #000;
    }
    
    /**
     * Add the correct font size in all browsers.
     */
    
    small {
      font-size: 80%;
    }
    
    /**
     * Prevent `sub` and `sup` elements from affecting the line height in
     * all browsers.
     */
    
    sub,
    sup {
      font-size: 75%;
      line-height: 0;
      position: relative;
      vertical-align: baseline;
    }
    
    sub {
      bottom: -0.25em;
    }
    
    sup {
      top: -0.5em;
    }
    
    /* Embedded content
       ========================================================================== */
    
    /**
     * Add the correct display in IE 9-.
     */
    
    audio,
    video {
      display: inline-block;
    }
    
    /**
     * Add the correct display in iOS 4-7.
     */
    
    audio:not([controls]) {
      display: none;
      height: 0;
    }
    
    /**
     * Remove the border on images inside links in IE 10-.
     */
    
    img {
      border-style: none;
    }
    
    /**
     * Hide the overflow in IE.
     */
    
    svg:not(:root) {
      overflow: hidden;
    }
    
    /* Forms
       ========================================================================== */
    
    /**
     * 1. Change the font styles in all browsers (opinionated).
     * 2. Remove the margin in Firefox and Safari.
     */
    
    button,
    input,
    optgroup,
    select,
    textarea {
      font-family: sans-serif; /* 1 */
      font-size: 100%; /* 1 */
      line-height: 1.15; /* 1 */
      margin: 0; /* 2 */
    }
    
    /**
     * Show the overflow in IE.
     * 1. Show the overflow in Edge.
     */
    
    button,
    input { /* 1 */
      overflow: visible;
    }
    
    /**
     * Remove the inheritance of text transform in Edge, Firefox, and IE.
     * 1. Remove the inheritance of text transform in Firefox.
     */
    
    button,
    select { /* 1 */
      text-transform: none;
    }
    
    /**
     * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
     *    controls in Android 4.
     * 2. Correct the inability to style clickable types in iOS and Safari.
     */
    
    button,
    html [type="button"], /* 1 */
    [type="reset"],
    [type="submit"] {
      -webkit-appearance: button; /* 2 */
    }
    
    /**
     * Remove the inner border and padding in Firefox.
     */
    
    button::-moz-focus-inner,
    [type="button"]::-moz-focus-inner,
    [type="reset"]::-moz-focus-inner,
    [type="submit"]::-moz-focus-inner {
      border-style: none;
      padding: 0;
    }
    
    /**
     * Restore the focus styles unset by the previous rule.
     */
    
    button:-moz-focusring,
    [type="button"]:-moz-focusring,
    [type="reset"]:-moz-focusring,
    [type="submit"]:-moz-focusring {
      outline: 1px dotted ButtonText;
    }
    
    /**
     * Change the border, margin, and padding in all browsers (opinionated).
     */
    
    fieldset {
      border: 1px solid #c0c0c0;
      margin: 0 2px;
      padding: 0.35em 0.625em 0.75em;
    }
    
    /**
     * 1. Correct the text wrapping in Edge and IE.
     * 2. Correct the color inheritance from `fieldset` elements in IE.
     * 3. Remove the padding so developers are not caught out when they zero out
     *    `fieldset` elements in all browsers.
     */
    
    legend {
      box-sizing: border-box; /* 1 */
      color: inherit; /* 2 */
      display: table; /* 1 */
      max-width: 100%; /* 1 */
      padding: 0; /* 3 */
      white-space: normal; /* 1 */
    }
    
    /**
     * 1. Add the correct display in IE 9-.
     * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
     */
    
    progress {
      display: inline-block; /* 1 */
      vertical-align: baseline; /* 2 */
    }
    
    /**
     * Remove the default vertical scrollbar in IE.
     */
    
    textarea {
      overflow: auto;
    }
    
    /**
     * 1. Add the correct box sizing in IE 10-.
     * 2. Remove the padding in IE 10-.
     */
    
    [type="checkbox"],
    [type="radio"] {
      box-sizing: border-box; /* 1 */
      padding: 0; /* 2 */
    }
    
    /**
     * Correct the cursor style of increment and decrement buttons in Chrome.
     */
    
    [type="number"]::-webkit-inner-spin-button,
    [type="number"]::-webkit-outer-spin-button {
      height: auto;
    }
    
    /**
     * 1. Correct the odd appearance in Chrome and Safari.
     * 2. Correct the outline style in Safari.
     */
    
    [type="search"] {
      -webkit-appearance: textfield; /* 1 */
      outline-offset: -2px; /* 2 */
    }
    
    /**
     * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
     */
    
    [type="search"]::-webkit-search-cancel-button,
    [type="search"]::-webkit-search-decoration {
      -webkit-appearance: none;
    }
    
    /**
     * 1. Correct the inability to style clickable types in iOS and Safari.
     * 2. Change font properties to `inherit` in Safari.
     */
    
    ::-webkit-file-upload-button {
      -webkit-appearance: button; /* 1 */
      font: inherit; /* 2 */
    }
    
    /* Interactive
       ========================================================================== */
    
    /*
     * Add the correct display in IE 9-.
     * 1. Add the correct display in Edge, IE, and Firefox.
     */
    
    details, /* 1 */
    menu {
      display: block;
    }
    
    /*
     * Add the correct display in all browsers.
     */
    
    summary {
      display: list-item;
    }
    
    /* Scripting
       ========================================================================== */
    
    /**
     * Add the correct display in IE 9-.
     */
    
    canvas {
      display: inline-block;
    }
    
    /**
     * Add the correct display in IE.
     */
    
    template {
      display: none;
    }
    
    /* Hidden
       ========================================================================== */
    
    /**
     * Add the correct display in IE 10-.
     */
    
    [hidden] {
      display: none;
    }
    

    index.html

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>FC游乐园</title>
        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
        <link rel="stylesheet" href="./lib/iconfont/iconfont.css">
        <link rel="stylesheet" href="./css/index.css">
    </head>
    <body>
        <!-- 主体内容 -->
        <div class="main">
            <!-- banner -->
            <div class="banner">
                <ul>
                    <li><a href="#"><img src="./uploads/banner_1.png" alt=""></a></li>
                </ul>
            </div>
    
            <!-- 活动标题 -->
            <div class="title">
                <h4>乐园活动</h4>
            </div>
    
            <!-- 活动 -->
            <section class="item">
                <div class="pic">
                    <a href="#"><img src="./uploads/item_2.png" alt=""></a>
                </div>
                <div class="txt">1</div>
            </section>
        </div>
        <!-- 主体内容 -->
    
        <!-- 底部工具栏 -->
        <footer>2</footer>
        <!-- 底部工具栏 -->
        <script src="./js/flexible.js"></script>
    </body>
    </html>
    

学在苦中求,艺在勤中练

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/160748.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

2022年跨境物流指数研究报告

第一章 行业概况 指提供跨境物流服务的行业。跨境物流是指在电子商务环境下&#xff0c;依靠互联网、大数据、信息化与计算机等先进技术&#xff0c;物品从跨境电商企业流向跨境消费者的跨越不同国家或地区的物流活动。 图 物流运输行业产业链结构图 资料来源&#xff1a;资产…

Tapdata Cloud 场景通关系列:集成阿里云计算巢,实现一键云上部署真正开箱即用

【前言】作为中国的 “Fivetran/Airbyte”, Tapdata Cloud 自去年发布云版公测以来&#xff0c;吸引了近万名用户的注册使用。应社区用户上生产系统的要求&#xff0c;Tapdata Cloud 3.0 将正式推出商业版服务&#xff0c;提供对生产系统的 SLA 支撑。Tapdata 目前专注在实时数…

VS2010 安装NuGet NPIO 基础连接已经关闭:发送时发生错误

1.下载Nuget并安装 NuGet Package Manager - Visual Studio Marketplace 工具->扩展管理器可看见 2.安装NPOI 3. 如果遇见基础连接已经关闭:发送时发生错误 要把https://packages.nuget.org/改为https://www.nuget.org/api/v2/ VS2019要使用https://www.nuget.org/api/v…

OAuth2.0 详解

OAuth2.0介绍 OAuth&#xff08;Open Authorization&#xff09;是一个关于授权&#xff08;authorization&#xff09;的开放网络标准&#xff0c;允许用户授权第三方 应用访问他们存储在另外的服务提供者上的信息&#xff0c;而不需要将用户名和密码提供给第三方移动应用或分…

【日常系列】LeetCode《26·动态规划1》

数据规模->时间复杂度 <10^4 &#x1f62e;(n^2) <10^7:o(nlogn) <10^8:o(n) 10^8<:o(logn),o(1) lc 509【剑指 10-1】&#xff1a;斐波那契数列问题 - 动态规划入门 https://leetcode.cn/problems/fibonacci-number/ 提示&#xff1a; 0 < n < 30 #方案…

WebSocket概念及实现简易聊天室

WebSocket实现简易聊天室 1 WebSocket介绍 网络通信协议是HTML5开始提供的一个单个TCP连接上进行全双工通信协议 1.1 诞生原因&#xff08;http无状态、无连接&#xff09; ①HTTP协议&#xff1a; 由于HTTP协议是一种无状态、无连接、单向的应用层协议&#xff0c;通信请求只…

Java反射机制是什么?

Java 反射机制是 Java 语言的一个重要特性。在学习 Java 反射机制前&#xff0c;大家应该先了解两个概念&#xff0c;编译期和运行期。 编译期是指把源码交给编译器编译成计算机可以执行的文件的过程。在 Java 中也就是把 Java 代码编成 class 文件的过程。编译期只是做了一些…

Qt Creator添加自定义向导

文章目录一、前言二、前置说明三、wizard.json解析3.1、宏观结构3.2、微观解释3.2.1、向导信息3.2.2、定义变量3.2.3、页面定义3.2.4、文件生成四、实战一、前言 在Qt Creator中&#xff0c;当我们选择新建时&#xff0c;Qt自带了很多选项&#xff1b; 如果我们在开发过程中&a…

软件测试——使用mujava测试过程中

文章目录下载对应安装包步骤二、修改代码第二部分&#xff0c;修改对应测试文件下载对应安装包 分别下载junit.jar、mujava.jar和openjava.jar三个包&#xff0c;并设定对应系统路径。三个安装包的下载路径以mujava.jar为例子 设置系统环境变量&#xff0c;计算机》属性》高级…

golang实现一个linux命令ls命令(命令行工具构建)

希望2023可以听到这些话&#xff1a; 恭喜你得到了这份工作恭喜你的建议被采用了恭喜你被录取了恭喜你的考试顺利通过了恭喜你上岸了恭喜你升职了恭喜你加薪了恭喜你体检结果一切正常在这篇文章下面许个愿吧&#xff01; ls 命令 要实现ls&#xff0c;首先先我们复习一下ls命令…

FPGA知识汇集-ASIC向FPGA的移植

ASIC原型验证是整个验证环节中非常重要的步骤之一&#xff0c;也是将ASIC的代码移植到FPGA平台上最重要的原因&#xff0c;本文章的意义在于&#xff1a; 对于系统构架师&#xff0c;将帮助他们在选择商用模拟器还是自行设计方案之间做出更好的选择&#xff1b; 对于逻辑工程师…

一文读懂Go Http Server原理

hello大家好呀&#xff0c;我是小楼&#xff0c;这是系列文《Go底层原理剖析》的第二篇&#xff0c;依旧是分析 Http 模块&#xff0c;话不多说&#xff0c;开始。 从一个 Demo 入手 俗话说万事开头难&#xff0c;但用 Go 实现一个 Http Server 真不难&#xff0c;简单到什么程…

2、Eclipse安装与使用

目录 一、简介 二、下载 三、Eclipse安装 &#xff08;1&#xff09;找到Eclipse安装包&#xff0c;右键【以管理员身份运行】 2.因为是写Java程序&#xff0c;所以安装第一个喽 3.安装位置设置&#xff08;不建议C盘安装哦&#xff09;&#xff0c;点击【INSTALL】 3.点…

day02 数组 | 977、有序数组的平方 209、长度最小的子数组 59、螺旋矩阵II

1、题目 977、有序数组的平方 给你一个按 非递减顺序 排序的整数数组 nums&#xff0c;返回 每个数字的平方 组成的新数组&#xff0c;要求也按 非递减顺序 排序。 示例 1&#xff1a; 输入&#xff1a;nums [-4,-1,0,3,10] 输出&#xff1a;[0,1,9,16,100] 解释&#xff1…

github Page博客速度优化+Cloudflare_https两端配置+解决重定向次数过多问题

网站加速调优 自从加了CDN之后我的博客偶尔会报错”重定向次数过多“ 症状&#xff1a; XXX.XXX.XXX 将您重定向的次数过多。 尝试清除 Cookie. ERR_TOO_MANY_REDIRECTS 可能原因 参考阿里云cdn解决方案https://help.aliyun.com/document_detail/451418.html但是cloudflar…

【UCIe】UCIe Stall 介绍

&#x1f525;点击查看精选 UCIe 系列文章&#x1f525; &#x1f525;点击进入【芯片设计验证】社区&#xff0c;查看更多精彩内容&#x1f525; &#x1f4e2; 声明&#xff1a; &#x1f96d; 作者主页&#xff1a;【MangoPapa的CSDN主页】。⚠️ 本文首发于CSDN&#xff0…

【SAP Hana】SAP Hana存储过程开发

SAP Hana存储过程开发Hana 存储过程1、创建&更新语法2、删除语法3、调用语法4、实例演示&#xff08;1&#xff09;存储过程入门&#xff08;2&#xff09;指定 DEFAULT SCHEMA&#xff08;3&#xff09;定义内部变量&#xff0c;执行多个查询&#xff08;4&#xff09;定义…

【Javascript】高阶函数,JSON,forEach,map,filter,reduce等高阶函数,函数绑定

❤️ Author&#xff1a; 老九 ☕️ 个人博客&#xff1a;老九的CSDN博客 &#x1f64f; 个人名言&#xff1a;不可控之事 乐观面对 &#x1f60d; 系列专栏&#xff1a; 文章目录高阶函数箭头函数apply函数JSONfilter函数map函数总结reduce函数find/findIndex函数every/some函…

【Android安全】frida-gum教程

frida-gum教程 frida-gum概述 frida-gum是基于inline-hook实现的 提供的功能&#xff1a;代码跟踪&#xff08;Stalker&#xff09;、内存访问监控&#xff08;MemoryAccessMonitor&#xff09;、符号查找、栈回溯实现、内存扫描、动态代码生成和重定位 inline Hook 原理 .…

MySQL中常见的数值函数

第一个 ceil(x)&#xff1a;向上取整 取整&#xff0c;顾名思义就是取整数&#xff1b; 向上取整是只要小数位不是 0&#xff0c;都会向上进 1 位整数。 案例 1&#xff1a; select ceil(9.2); 解析&#xff1a; 9.2 向上取一位整数&#xff0c;就是 10。 查询结果&#xff…