当前位置:首页 > CSS

css制作印章

2026-01-28 04:30:57CSS

使用CSS制作印章

使用CSS可以创建简单的印章效果,主要通过边框、圆角、文本和阴影等属性实现。以下是几种常见的印章样式实现方法:

css制作印章

圆形印章

<div class="stamp-circle">印章</div>
.stamp-circle {
  width: 150px;
  height: 150px;
  border: 5px solid red;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: red;
  text-shadow: 0 0 5px rgba(0,0,0,0.3);
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

方形印章

<div class="stamp-square">专用章</div>
.stamp-square {
  width: 120px;
  height: 120px;
  border: 4px solid red;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  color: red;
  transform: rotate(15deg);
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

带有边框文字的印章

<div class="stamp-text-border">
  <div class="inner-text">公司印章</div>
  <div class="border-text">有限公司</div>
</div>
.stamp-text-border {
  width: 160px;
  height: 160px;
  border: 3px solid red;
  border-radius: 50%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.inner-text {
  font-size: 22px;
  font-weight: bold;
  color: red;
}

.border-text {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 16px;
  color: red;
  transform: rotate(0deg);
}

做旧效果印章

<div class="stamp-aged">批准</div>
.stamp-aged {
  width: 100px;
  height: 100px;
  border: 3px dashed rgba(200, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  color: rgba(200, 0, 0, 0.7);
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  opacity: 0.9;
}

实现技巧

  • 使用border-radius: 50%创建圆形印章
  • 通过transform: rotate()实现印章倾斜效果
  • 使用半透明颜色(rgba)制作老旧印章效果
  • 添加text-shadowbox-shadow增强立体感
  • 结合伪元素(::before, ::after)添加装饰性元素

这些CSS方法可以组合使用,根据实际需求调整尺寸、颜色和样式,创建各种风格的印章效果。

标签: 印章css
分享给朋友:

相关文章

css 制作石头

css 制作石头

使用CSS制作石头效果 通过CSS的border-radius、box-shadow和background属性可以模拟石头的自然外观。以下是一个简单实现: <div class="stone"…

css图标制作

css图标制作

CSS 图标制作方法 使用 Unicode 或图标字体 通过引入字体库(如 Font Awesome)或直接使用 Unicode 符号生成图标。例如,Font Awesome 的图标可通过类名调用:…

min.css制作

min.css制作

使用 min.css 制作轻量级样式 min.css 是一个极简的 CSS 框架,专注于轻量化和快速加载。以下是如何使用 min.css 进行开发的步骤。 引入 min.css 通过 CDN 直接引…

css制作三角形

css制作三角形

使用边框制作三角形 通过设置元素的宽度和高度为0,并利用边框属性,可以创建不同方向的三角形。例如,要创建一个向下的三角形: .triangle-down { width: 0; height…

css制作按钮

css制作按钮

基础按钮样式 使用CSS创建一个基础按钮需要定义display、padding、background-color和border等属性。以下是一个简单的示例: .button { display:…

淘宝导航css制作

淘宝导航css制作

淘宝导航 CSS 制作方法 淘宝导航栏通常包含多个层级菜单、下拉框和响应式设计。以下是实现类似效果的 CSS 制作方法: 基础结构 导航栏通常使用 <nav> 或 <div>…