CSS display: none 示例

CSS display: none1 个文件更新于 2026-04-06
html公开前 25 行,完整代码需登录
<style>
  .none-demo {
    background-color: #e8e8e8;
    padding: 10px;
  }
  .visible-item {
    display: block;
    width: 200px;
    height: 60px;
    background-color: #2196F3;
    border: 1px solid #000;
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    line-height: 60px;
    margin: 5px 0;
  }
  .hidden-item {
    display: none;
    width: 200px;
    height: 60px;
    background-color: #9C27B0;
    border: 1px solid #000;
    color: white;

登录后可以查看完整源码、在线编辑并实时预览运行效果。