当前位置:首页 > CSS

css印章制作

2026-02-13 06:02:38CSS

CSS 印章制作方法

使用 CSS 制作印章效果可以通过边框、圆角、阴影和文本装饰等属性实现。以下是几种常见的印章样式实现方法。

圆形印章

通过 border-radius 设置为 50% 创建圆形边框,结合 borderbox-shadow 增强视觉效果。

.seal-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid red;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "SimSun", serif;
  color: red;
  text-align: center;
  line-height: 1.2;
}

方形印章

方形印章通常使用实线边框和红色填充,搭配旋转文本效果。

.seal-square {
  width: 120px;
  height: 120px;
  border: 2px solid red;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "SimSun", serif;
  color: red;
  text-align: center;
  transform: rotate(-15deg);
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

文字环绕效果

使用 transform 和伪元素实现文字环绕印章边缘的效果。

.seal-text-around {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px dashed red;
  margin: 20px;
}

.seal-text-around::before {
  content: "• 公章专用 • 公章专用 •";
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  color: red;
  font-family: "SimSun", serif;
  font-size: 12px;
}

五角星图案

通过 CSS 绘制五角星作为印章中心图案。

.seal-star {
  position: relative;
  width: 0;
  height: 0;
  color: red;
  margin: 20px auto;
  border-right: 30px solid transparent;
  border-bottom: 20px solid red;
  border-left: 30px solid transparent;
  transform: rotate(35deg);
}

.seal-star::before {
  content: "";
  position: absolute;
  top: -12px;
  left: -32px;
  width: 0;
  height: 0;
  border-right: 30px solid transparent;
  border-bottom: 20px solid red;
  border-left: 30px solid transparent;
  transform: rotate(-70deg);
}

组合完整印章

将圆形边框、环绕文字和五角星组合成完整印章效果。

css印章制作

<div class="seal-complete">
  <div class="seal-text-around">公司名称</div>
  <div class="seal-star"></div>
  <div class="seal-number">编号:123456</div>
</div>
.seal-complete {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid red;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.seal-number {
  position: absolute;
  bottom: 20px;
  color: red;
  font-family: "SimSun", serif;
  font-size: 12px;
}

这些方法可以通过调整尺寸、颜色和文本内容来适应不同场景的印章需求。

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

相关文章

css制作滑动页面

css制作滑动页面

使用CSS实现滑动页面 通过CSS可以实现多种滑动页面效果,包括横向滑动、纵向滑动以及视差滚动等。以下是几种常见的实现方法: 横向滑动效果 横向滑动通常用于展示一组卡片或图片,可以通过CSS的ove…

div和css制作

div和css制作

使用 div 和 CSS 制作网页布局 HTML 结构 通过 div 标签划分页面区域,例如头部、主体、侧边栏和页脚: <div class="container"> <…

css制作靶子

css制作靶子

CSS 制作靶子 使用 CSS 可以轻松创建一个靶子效果,主要通过嵌套的圆形元素和背景色实现。以下是实现方法: HTML 结构 <div class="target"> &…

css模板制作

css模板制作

CSS 模板制作方法 制作 CSS 模板的核心是设计一套可复用的样式规则,适用于多种网页或项目。以下是具体方法: 定义基础样式 设置全局默认样式,包括字体、颜色、边距等。例如: body {…

css制作菜单

css制作菜单

CSS 制作菜单的方法 使用 CSS 可以制作多种风格的菜单,包括水平菜单、垂直菜单、下拉菜单等。以下是几种常见的实现方式。 水平菜单 水平菜单通常用于导航栏,可以通过 display: inlin…

css制作导航条

css制作导航条

导航条基础结构 使用HTML构建导航条的基本结构,通常包含一个<nav>标签和多个<a>标签作为导航链接。示例代码如下: <nav class="navbar">…