4H5样式控制CSS1-美化网页元素

本文详细介绍了如何使用CSS来美化网页元素,包括文本高亮、行高设置、背景透明、字体加粗、颜色设定、文本对齐、装饰效果、垂直对齐、文本阴影、超链接样式、列表样式、背景颜色、背景图像、背景尺寸和线性渐变等。通过实例展示了如何通过CSS实现特定样式的定制,如突出显示文本、设置字体类型、风格、大小和粗细,以及调整文本颜色和链接样式等。

#CSS美化网页元素

在某一段文本中突出显示某几个字,以粗体、红色、大字号显示,通常使用(<span> )标签

在CSS中,设置文本行高使用(line-height)属性

在CSS中设置背景颜色为透明的值为(transparent)

设置文本字体加粗的属性是什么?

去掉列表项前标记符号的CSS属性是什么?

描述使用font属性设置字体类型、风格、大小、粗细的样式顺序

1<span>标签

1属性表

1font-family

2font-size

3font-style

4font-weight

5font属性顺序sty-w-s-f

2文本属性表

1color

2缩进

3文本装饰

4文本阴影-参数

3超链接相关表

1list-style

2background-color

3背景图像属性

4图像

1背景属性

5背景尺寸 apcc

6颜色线性渐变

1参数列表解释

总结

1<span>标签的应用-定制特定样式部分

<head lang="en">

    <meta charset="UTF-8">

    <title>span标签的应用</title>

    <style type="text/css">

        p {

            font-size14px;

        }

        p .show.bird span {

            font-size36px;

            font-weightbold;

            colorblue;

        }

        p #dream {

            font-size24px;

            font-weightbold;

            colorred;

        }

    </style>

</head>

<body>

<p>享受<span class="show">“北大式”</span>教育服务</p>

<p>在北大青鸟,有一群人默默支持你成就<span id="dream">IT梦想</span></p>

<p class="bird">选择<span>北大青鸟</span>,成就你的梦想</p>

</body>

2字体类型font-family

body{font-familyTimes,"Times New Roman""楷体";}

<head lang="en">

    <meta charset="UTF-8">

    <title>字体类型</title>

    <link href="css/font.css" rel="stylesheet" type="text/css"/>

</head>

<body>

<div>

    <h1>京东商城――全部商品分类</h1>

    <h2>图书、音像、电子书刊</h2>

    <p><span>电子书刊</span> 电子书 网络原创 数字杂志 多媒体图书目<br/>

        <span>音像</span>音乐 影视 教育音像<br/>

        <span>经管励志</span> 经济 金融与投资 管理 励志与成功</p>

    <h2>家用电器</h2>

    <p><span>大家电</span> 平板电视 空调 冰箱 DVD播放机<br/>

        <span>生活电器</span> 净化器 电风扇 饮水机 电话机</p>

    <h2>个护化妆</h2>

    <p><span>面部护理</span> 洁面乳 精华露 眼部护理 T区护理<br/>

        <span>身体护理</span> 洗发护发 沐浴 手工/香皂 手足护理<br/>

        <span>香水SPA</span> 女士香水 男士香水 组合套装 迷你香水</p>

    <h2>钟表</h2>

    <p><span>瑞士品牌</span> 江诗丹顿 卡地亚Cartier 帝舵TUDOR 真利时ZENITH 雷蒙威Raymond Well<br/>

        <span>时尚品牌</span> 巴宝莉BURBERRY 雅克利曼Jacques Lemans 苏菲玛索Sophie Marceau<br/>

        <span>国产品牌</span> 聚利时Julius 北京beijing 依宝诺EBONO 劳士顿</p>

    <h2>服饰鞋帽</h2>

    <p><span>女装</span> T恤 衬衫 针织衫 卫衣 连衣裙 风衣 大衣 休闲裤<br/>

        <span>男装</span> 衬衫 POLO衫 针织衫 皮衣 外套 棉服 大衣<br/>

        <span>运动</span> 休闲鞋 跑步鞋 足球鞋 运动裤 运动包</p>

</div>

</body>

3字体风格font-style

body{font-familyTimes,"Times New Roman""楷体";}

h1{font-size:24pxfont-style:italic;}

h1 span{font-style:oblique;}

h2{font-size:16pxfont-style:normal;}

p{font-size:12px;}

4字体的粗细font-weight

body{font-familyTimes,"Times New Roman""楷体";}

h1{font-size:24pxfont-style:italic;}

h1 span{font-style:obliquefont-weight:normal;}

h2{font-size:16pxfont-style:normal;}

p{font-size:12px;}

p span{font-weight:bold;}

p span{font:oblique bold 12px "楷体";}

5文本颜色color:#...

h1{color:rgba(0,0,255,0.5); font-size:24px; }

h3{font:12px normal;}

p{font-size:12px;}

p span{color:#F00;}

<head lang="en">

    <meta charset="UTF-8">

<title>总裁致辞页面</title>

<link href="css/common.css" rel="stylesheet" type="text/css" />

</head>

<body>

<h1>总裁致辞</h1>

<h3>来源:来自北大青鸟</h3>

<hr/>

<p><img src="image/icon.jpg"  alt="高管团队" width="176" height="108" />目前北大青鸟IT教育全体系员工<span>10000</span>余名、授权培训中心<span>180</span>余家、合作院校<span>500</span>余所、覆盖全国<span>90</span>余座城市,市场占有率达到<span>39.8%</span></p>

<p>作为IT职业教育的先行者,北大青鸟IT教育创新的职业教育理念和业务经营模式得到了社会的广泛认可:国家人力资源和社会保障部与北大青鸟IT教育实施课程联合认证制度;公司两度入选中华人民共和国商务部评选的“中国连锁经营百强企业”,是迄今为止教育培训领域唯一上榜品牌。公司连续两年荣获 “中国服务业十大优秀特许品牌”称号,并获得中国特许经营协会颁发的中国连锁经营百强和中国特许经营年度大奖;获得新浪颁发的“中国教育杰出贡献奖”和“中国十大品牌教育集团”称号;并赢得 “中国IT公众认知企业金奖”、“本土最具知名度认证奖”、“最佳就业认同奖”、“质量放心用户满意双优品牌”、“最佳实用课程奖”等数十个奖项。人民日报、光明日报、经济日报、解放日报、中国青年报、中国计算机报等几十家权威媒体对公司进行了多方面的报道。</p>

<p>2000年,北大青鸟IT教育创造性地将特许经营模式引入到IT职业教育领域,在全国建立“北大青鸟APTECH计算机授权培训中心”。所有中心实行统一经营管理、严格保证教学质量,受到社会和业界的高度认可。发展速度之快、经营规模之大、学员人数之多,在全国众多IT职业培训机构中一枝独秀。成立至今,北大青鸟IT教育先后培养<span>45</span>万名学员进入IT行业。</p>

</body>

6排版文本段落text-align:LRC

text-decoration:blink  //定义闪烁的文本,

 IE、Chrome 或 Safari 不支持 "blink" 属性值。

text-indent:2em 段前缩进2字符

2em相对单位

text的意思是文本,indent在计算机英语中意思是缩进,至于后面的2em意思就是2个相对单位

em又是什么单位?
em这个单位的意思就是文字的高度,1em就是1个文字的高度,2em就是两个文字高度,所以我们写的“text-indent:2em;”的意思就是,文本缩进2个文字的高度,因为汉字是方块字,高度和宽度是一样的,所以缩进2个文字的高度,就等于缩进两个文字的宽度,最后的效果就是缩进了两个文字。

【说明一点】
对于"text-indent:2em;"属性,只能加在块状元素上面,内联元素是不起作用的。

h1{color:#091CC4font-size:24pxtext-align:centertext-decoration:blink;}

h3{text-align:rightfont:12px normal;}

p{font-size:12pxtext-align:leftline-height:28pxtext-indent:2em;}

p span{color:#F00;}

7文本装饰

text-decoration:

underline下overline上none无line-through删除线

<head lang="en">

    <meta charset="UTF-8">

    <title>text-decoration</title>

    <style>

        a:nth-of-type(1){  text-decorationunderline;  }

        a:nth-of-type(2){  text-decorationoverline;  }

        a:nth-of-type(3){  text-decorationline-through;  }

        a:nth-of-type(4){  text-decorationnone;  }

    </style>

</head>

<body>

    <a href="#">下划线:underline</a> <br/> <br/>

    <a href="#">上划线:overline</a> <br/> <br/>

    <a href="#">删除线:line-through</a> <br/>  <br/>

    <a href="#">无下划线:none</a> <br/> <br/>

</body>

8垂直对齐方式

vertical-align:middle;

<head lang="en">

    <meta charset="UTF-8">

<title>垂直对齐方式</title>

<style type="text/css">

 img,span{

    vertical-align:middle;

}

</style>

</head>

<body>

   <p>

       <img src="image/icon.gif" width="129" height="121" />

       <span>图片与文本垂直居中对齐</span>

   </p>

</body>

9文本阴影

text-shadow: c,x,y,r

<head lang="en">

    <meta charset="UTF-8">

<title>文本阴影</title>

<style type="text/css">

    h2{  font-size18px;  text-shadowblue 10px 10px 2px;  }

</style>

</head>

<body>

   <h2>七彩大乐透</h2>

    <p>七彩第20170808期开奖揭晓,具体开奖结果为7,24,16,2,14,9,22,特别号码23.本期前两位那希望号码将会开出?请查询专家号</p>

</body>

10超链接样式

a:hover{...}

<head lang="en">

    <meta charset="UTF-8">

    <title>图书列表页</title>

    <style>

        p{

            font-size14px;

        }

        a{

            text-decorationnone;

        }

        a:hover{

            text-decorationunderline;

            colororange;

        }

    </style>

</head>

<body>

    <!--图片超链接-->

    <a href="#" >

        <img src="image/img1.png" alt="姑娘,欢迎降落在这残酷的世界" title="姑娘,欢迎降落在这残酷的世界" />

    </a>

    <!--文字超链接-->

    <p><a href="#" >姑娘,欢迎降落在这残酷的世界</a></p>

    <p><a href="#" >作者:一门</a></p>

    <p>¥58</p>

</body>

11列表样式ul li{...}

.title {

    font-size18px;

    font-weightbold;

    text-indent1em;

    line-height35px;

}

ul li {

    height30px;

    line-height25px;

    text-indent1em;

    list-stylenone;

}

a {

    font-size14px;

    text-decorationnone;

    color#000;

}

a:hover {

    color#F60;

    text-decorationunderline;

}

<head lang="en">

    <meta charset="UTF-8">

    <title>列表样式</title>

    <link href="css/background.css" rel="stylesheet" type="text/css"/>

</head>

<body>

<h2 class="title">全部商品分类</h2>

<ul>

    <li><a href="#">图书</a>  <a href="#">音像</a>  <a href="#">数字商品</a></li>

    <li><a href="#">家用电器</a>  <a href="#">手机</a>  <a href="#">数码</a></li>

    <li><a href="#">电脑</a>  <a href="#">办公</a></li>

    <li><a href="#">家居</a>  <a href="#">家装</a>  <a href="#">厨具</a></li>

    <li><a href="#">服饰鞋帽</a>  <a href="#">个护化妆</a></li>

    <li><a href="#">礼品箱包</a>  <a href="#">钟表</a>  <a href="#">珠宝</a></li>

    <li><a href="#">食品饮料</a>  <a href="#">保健食品</a></li>

    <li><a href="#">彩票</a>  <a href="#">旅行</a>  <a href="#">充值</a>  <a href="#">票务</a>

    </li>

</ul>

</body>

12背景颜色bg-color

#nav {

    width:230px;

    background-color:#D7D7D7;

}

.title {

    background-color:#C00;

    font-size:18px;

    font-weight:bold;

    color:#FFF;

    text-indent:1em;

    line-height:35px;

}

#nav ul li {

    height:25px;

    line-height:25px;

    list-stylenone;

}

a {

    font-size:14px;

    text-decoration:none;

    color:#000;

}

a:hover {

    color:#F60;

    text-decoration:underline;

}

14背景图像bg-img

位置等等no-repeat,rp,rp-x,rp-y

bg:color url w h positon

#nav {

    width:230px;

    background-color:#D7D7D7;

}

.title {

    /*background-color:#C00;*/

    font-size:18px;

    font-weight:bold;

    color:#FFF;

    text-indent:1em;

    line-height:35px;

    /*background-image:url(../image/arrow-down.gif);

    background-repeat:no-repeat;

    background-position:205px 10px;*/

    background:#C00 url(../image/arrow-down.gif) 205px 10px no-repeat;

}

#nav ul li {

    height:30px;

    line-height:25px;

    list-stylenone;

    background-image:url(../image/arrow-right.gif);

    background-repeat:no-repeat;

    background-position:170px 2px;

}

a {

    font-size:14px;

    text-decoration:none;

    color:#000;

}

a:hover {

    color:#F60;

    text-decoration:underline;

}

13背景重复repeat

<head lang="en">

    <meta charset="UTF-8">

    <title>  background-repeat</title>

    <style>

        div{

            width400px;

            height400px;

            border1px solid red;

            background-image: url("image/1.jpg");

        }

        .div1{

            background-repeatrepeat-x;

        }

        .div2{

            background-repeatrepeat-y;

        }

        .div3{

            background-repeatno-repeat;

        }

    </style>

</head>

<body>

    <div class="div1"></div>

    <div class="div2"></div>

    <div class="div3"></div>

</body>

15CSS3背景属性

bg-size-a\p\c\c

<head lang="en">

    <meta charset="UTF-8">

    <title></title>

    <style>

        div {

            width200px;

            height130px;

            border1px solid red;

            background: url("img/bg_flower.gif"no-repeat;

            /*background-size: auto;*/

            /*background-size: 120px 60px;*/

            /*background-size: 120px;*/

            /*background-size: 50% 80%;*/

            /*background-size: cover;*/

            /*background-position: center;*/

            background-sizecontain;

        }

    </style>

</head>

<body>

    <div></div>

</body>

16CSS3线性渐变

bg:linear-gradient(to top||bottomorangeblue);

目前可以不需要内核前缀

 background: -webkit-linear-gradient(to toporangeblue); /*-webkit-*/

此行可删!

<head lang="en">

    <meta charset="UTF-8">

    <title>CSS3线性渐变</title>

    <style>

        div {

            width100px;

            height100px;

            /*to top*/

            background: linear-gradient(to toporangeblue);

            background: -webkit-linear-gradient(to toporangeblue); /*-webkit-*/

            /*to bottom*/

            /*background: linear-gradient(to bottom, orange, blue);*/

            /*background: -webkit-linear-gradient(to bottom, orange, blue);*/

            /*to left*/

            /*background: linear-gradient(to left, orange, blue);*/

            /*background: -webkit-linear-gradient(to left, orange, blue);*/

            /*to right*/

            /*background: linear-gradient(to right, orange, blue);*/

            /*background: -webkit-linear-gradient(to right, orange, blue);*/

            /*to top left*/

            /*background: linear-gradient(to top left, orange, blue);*/

            /*background: -webkit-linear-gradient(to top left, orange, blue);*/

            /*to top right*/

            /*background: linear-gradient(to top right, orange, blue);*/

            /*background: -webkit-linear-gradient(to top right, orange, blue);*/

            /*to bottom left*/

            /*background: linear-gradient(to bottom left, orange, blue);*/

            /*background: -webkit-linear-gradient(to bottom left, orange, blue);*/

            /*to bottom right*/

            /*background: linear-gradient(to bottom right, orange, blue);*/

            /*background: -webkit-linear-gradient(to bottom right, orange, blue);*/

        }

    </style>

</head>

<body>

<div></div>

</body>

<template> <div class="editor-layout"> <!-- 固定头部 --> <header class="app-header"> <button class="back-btn" @click="handleBack"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M19 12H5M12 19l-7-7 7-7"/> </svg> </button> <h1 class="app-title">AI笔记编辑器</h1> <div class="header-right"> <button class="history-btn" @click="toggleHistory"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="10"></circle> <polyline points="12 6 12 12 16 14"></polyline> </svg> <span>历史记录</span> </button> <div class="user-avatar" @click="goToProfile"> <div class="avatar-placeholder"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path> <circle cx="12" cy="7" r="4"></circle> </svg> </div> </div> </div> </header> <!-- 固定工具栏 --> <div class="fixed-toolbar"> <Toolbar :editor="editorRef" :defaultConfig="toolbarConfig" /> </div> <!-- 编辑器区域 --> <div class="editor-container"> <Editor v-model="valueHtml" :defaultConfig="editorConfig" @onChange="handleChange" @onCreated="handleCreated" @onDestroyed="handleDestroyed" @onFocus="handleFocus" @onBlur="handleBlur" @customAlert="customAlert" @customPaste="customPaste" /> </div> <!-- 历史记录侧边栏 --> <div class="history-sidebar" :class="{ active: showHistory }"> <div class="sidebar-header"> <h2>历史记录</h2> <button class="close-btn" @click="toggleHistory"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <line x1="18" y1="6" x2="6" y2="18"></line> <line x1="6" y1="6" x2="18" y2="18"></line> </svg> </button> </div> <div class="history-list"> <div v-for="(item, index) in historyItems" :key="index" class="history-item"> <div class="history-title">{{ item.title }}</div> <div class="history-date">{{ item.date }}</div> </div> </div> </div> <!-- 历史记录遮罩 --> <div v-if="showHistory" class="sidebar-mask" @click="toggleHistory"></div> </div> </template> <script setup> import { onBeforeUnmount, ref, shallowRef } from 'vue' import { Editor, Toolbar } from '@wangeditor/editor-for-vue' import '@wangeditor/editor/dist/css/style.css' // 编辑器实例 const editorRef = shallowRef() // 内容 HTML const valueHtml = ref('<h1>欢迎使用AI笔记编辑器</h1><p>这是一个功能强大的富文本编辑器,支持多种格式和功能。</p><p>尝试使用工具栏上的功能来编辑内容!</p>') // 编辑器配置 const editorConfig = { placeholder: '请输入内容...', MENU_CONF: { insertImage: { checkImage(src) { if (src.indexOf("http") !== 0) { return "图片网址必须以 http/https 开头"; } return true; }, }, } } // 工具栏配置 const toolbarConfig = { toolbarKeys: [ 'headerSelect', 'bold', 'italic', 'underline', 'through', 'color', 'bgColor', 'fontSize', 'fontFamily', 'lineHeight', 'bulletedList', 'numberedList', 'todo', 'justifyLeft', 'justifyRight', 'justifyCenter', 'insertLink', 'insertImage', 'insertTable', 'codeBlock', 'blockquote', 'divider', 'emotion', 'undo', 'redo' ] } // 历史记录相关状态 const showHistory = ref(false) const historyItems = ref([ { title: 'AI生成的学习笔记', date: '2023-10-15 14:30' }, { title: '项目会议记录', date: '2023-10-14 09:45' }, { title: '技术方案设计', date: '2023-10-12 16:20' }, { title: '读书笔记 - 人工智能导论', date: '2023-10-10 11:15' }, { title: '周计划安排', date: '2023-10-08 08:30' } ]) // 编辑器回调函数 const handleCreated = (editor) => { editorRef.value = editor console.log("编辑器已创建", editor) } const handleChange = (editor) => { console.log("内容变化:", editor.children) } const handleDestroyed = (editor) => { console.log('编辑器已销毁', editor) } const handleFocus = (editor) => { console.log('编辑器获得焦点', editor) } const handleBlur = (editor) => { console.log('编辑器失去焦点', editor) } const customAlert = (info, type) => { alert(`【系统提示】${type} - ${info}`) } const customPaste = (editor, event, callback) => { console.log('粘贴事件', event) callback(true) // 继续默认的粘贴行为 } // 及时销毁编辑器 onBeforeUnmount(() => { const editor = editorRef.value if (editor == null) return editor.destroy() }) // 头部按钮功能 const handleBack = () => { alert('返回操作') } const toggleHistory = () => { showHistory.value = !showHistory.value } const goToProfile = () => { alert('跳转到个人用户管理界面') } </script> <style> /* 基础样式重置 */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } .editor-layout { position: relative; height: 100vh; overflow: hidden; background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%); } /* 固定头部样式 */ .app-header { position: fixed; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; padding: 0 20px; background: #ffffff; box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1); z-index: 1000; transition: all 0.3s ease; } .back-btn { width: 40px; height: 40px; border: none; background: none; cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; } .back-btn:hover { background: #f0f5ff; transform: translateX(-2px); } .back-btn svg { width: 20px; height: 20px; color: #4a6cf7; } .app-title { flex: 1; text-align: center; font-size: 1.4rem; font-weight: 600; color: #1a1a1a; letter-spacing: 0.5px; } .header-right { display: flex; align-items: center; gap: 15px; } .history-btn { display: flex; align-items: center; gap: 6px; padding: 8px 15px; background: #f0f5ff; border: none; border-radius: 20px; color: #4a6cf7; font-weight: 500; font-size: 0.9rem; cursor: pointer; transition: all 0.2s ease; } .history-btn:hover { background: #e1e9ff; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(74, 108, 247, 0.2); } .history-btn svg { width: 18px; height: 18px; } .user-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(118, 75, 162, 0.3); } .user-avatar:hover { transform: scale(1.05); box-shadow: 0 6px 15px rgba(118, 75, 162, 0.4); } .avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.2); } .avatar-placeholder svg { width: 18px; height: 18px; color: white; } /* 固定工具栏样式 */ .fixed-toolbar { position: fixed; top: 60px; /* 在头部下方 */ left: 0; right: 0; z-index: 999; background: white; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); border-bottom: 1px solid #eaeef5; padding: 0 10px; } /* 编辑器容器样式 */ .editor-container { margin-top: 110px; /* 头部高度 + 工具栏高度 */ height: calc(100vh - 110px); overflow-y: auto; padding: 20px; background: white; border-radius: 12px; margin-left: 20px; margin-right: 20px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); } /* 历史记录侧边栏 */ .history-sidebar { position: fixed; top: 0; right: -400px; width: 380px; height: 100vh; background: white; z-index: 2000; box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1); transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1); display: flex; flex-direction: column; } .history-sidebar.active { right: 0; } .sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #eee; } .sidebar-header h2 { color: #333; font-weight: 600; } .close-btn { background: none; border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; } .close-btn:hover { background: #f5f7fa; } .close-btn svg { width: 20px; height: 20px; color: #666; } .history-list { flex: 1; overflow-y: auto; padding: 15px; } .history-item { padding: 15px; border-radius: 8px; margin-bottom: 10px; background: #f9fbfd; transition: all 0.2s ease; cursor: pointer; border-left: 3px solid #4a6cf7; } .history-item:hover { background: #edf3ff; transform: translateX(5px); } .history-title { font-weight: 500; color: #1a1a1a; margin-bottom: 5px; } .history-date { font-size: 0.85rem; color: #666; } /* 历史记录遮罩 */ .sidebar-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); z-index: 1500; backdrop-filter: blur(2px); } /* 响应式设计 */ @media (max-width: 768px) { .app-header { padding: 0 10px; } .app-title { font-size: 1.1rem; } .history-btn span { display: none; } .editor-container { margin-left: 10px; margin-right: 10px; padding: 15px; } .history-sidebar { width: 85%; } } /* 滚动条美化 */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } ::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #a8a8a8; } </style> 我是说这个编辑器调宽一点,然后滚轮是页面的
07-26
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值