前端学习DAY26(华为平板页面)

复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>平板图片</title>
    <style>
.box{
    text-align: center;
}
.box p:first-of-type{
    font-size: 32px;
}
.box p:nth-of-type(1){
    color: #1b1a1a;
    font-size: 40px;
}
/* .box p1:nth-of-type(1){
    color: #ccc;
    font-size: 21px;
}
.box p1:nth-of-type(2){
    color: #ccc;
    font-size: 21px; 
} */
.box p:nth-of-type(2){
    color: #ccc;
    font-size: 26px;
}

.box p:nth-of-type(3){
    color: #eb9d0b;
    font-size: 30px;
}
.box span{
    color: #ccc;
    text-decoration: line-through;
}
    </style>
</head>
<body>
    <div class="box">
        <p>HUAWEI MatePad Pro 13.2"套装(星闪版)</p>
        <p>13.2英寸柔性OLED大屏&nbsp;|&nbsp;PC级专业办公生态&nbsp;|&nbsp;星闪手写笔*</p>
        <img src="./华为图片.jpg" alt="">      <!-- 图片没显示 -->
        <p>8099元&nbsp;&nbsp;<span>9?00元</span></p>
    </div>
复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>平板图片</title>
    <style>
.div_box{
    text-align: center;/* 文本行内元素 */
}
.bth{                   /* bth块元素 */
    width: 120px;
    height: 50px;
    background-color: #3c71d4;
    line-height: 50px;
    color: #f9f6f6;
    margin: 0 auto;      /* 适用于块元素左右居中 */
    margin-top: 30px;    /* 间距 */
    border-radius: 5px;  /* 圆角 */
}
.bth>span{
    font-weight: bold;       /* 字体加粗 */
}
 <div class="div_box">
        <img src="./华为图片.jpg" alt="">    <!-- 图片没显示 -->
        <div class="bth">
            <span>Harmony OS</span>
        </div>
    </div>
</body>
</html>
相关推荐
Want59521 分钟前
HTML礼物圣诞树
前端·html
REDcker23 分钟前
Cursor Chrome DevTools MCP 配置指南 for Windows
前端·windows·chrome devtools
张可爱34 分钟前
20251115复盘记录:让分页乖乖“坐好”+ 卡片统一渐变描边与圆角
前端
Jonathan Star42 分钟前
基于 **Three.js** 开发的 3D 炮弹发射特效系统
javascript·数码相机·3d
Cache技术分享1 小时前
241. Java 集合 - 使用 Collections 工厂类处理集合
前端·后端
Lear1 小时前
解决Flex布局中overflow:hidden失效
前端
Heo1 小时前
原型理解从入门到精通
前端·javascript·后端
Heo1 小时前
通用会话控制方案
前端·javascript·后端
Heo1 小时前
跨域问题解决方案汇总
前端·javascript·后端
馨谙1 小时前
RHEL 存储堆栈完全解析:从硬件到应用的存储管理指南
服务器·开发语言·php