找回密码
 立即注册
搜索
查看: 9|回复: 3

稿纸样式一:由CSS线性渐变背景模拟 转自马黑教程专版

[复制链接]

1638

主题

3439

回帖

1万

积分

管理员

积分
13933
发表于 7 小时前 | 显示全部楼层 |阅读模式
山河如卷阅春秋 作曲:墨音 作词:墨音 歌词内容 山河如卷阅春秋 平生知己最难求 萍萍相遇前世修 此生缘分不肯丢 浊酒经年酿温柔 万千心事晚风收 情深不问年多久 相守余生到白头

1638

主题

3439

回帖

1万

积分

管理员

积分
13933
 楼主| 发表于 7 小时前 | 显示全部楼层
<style>
.txtBox {
        margin: auto;
        padding: 0 8px;
        width: 400px;
        height: 520px;
        background-image: linear-gradient(#fff 25px, #ed8181db 0);
        background-size: 26px 26px;
        font: 14px / 26px Sans-serif;
}
</style>

<div class="txtBox">文本</div>

1638

主题

3439

回帖

1万

积分

管理员

积分
13933
 楼主| 发表于 7 小时前 | 显示全部楼层
<style>
.txtBox {
        margin: auto;
        min-width: 700px;
        min-height:520px;
        background-image: linear-gradient(#fff 25px, #ed8181db 0);
        background-size: 26px 26px;
        font: normal 15px / 26px Sans-serif;
        color: black;
        border: 30px solid #fff;
        position: relative;
}
.txtBox::before, .txtBox::after {
        position: absolute;
        color: #ccc;
        text-align: right;
        width: 100%;
        height: 26px;
        font-size: 10px;
        background: #fff;
        border: 20px;
}
.txtBox::before {
        content: attr(data-1);
        top: -26px;
        border-bottom: 2px solid red;
}
.txtBox::after {
        content: attr(data-2);
        bottom: -26px;
        border-top: 2px solid red;
}
</style>

<div class="txtBox" data-1="枫丹稿纸" data-2="Copyright &#169; 2022 All Right Reserved">
        文本<br>
        文本<br>
</div>

1638

主题

3439

回帖

1万

积分

管理员

积分
13933
 楼主| 发表于 7 小时前 | 显示全部楼层
        文本
        文本
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

协同嘉业科技有限公司 ( 京ICP备2024053108号-1 )

GMT+8, 2026-10-30 08:00 , Processed in 0.089801 second(s), 32 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表