CSS

  • css超出隐藏并用...表示

    <divclass="tetx1"><p>我是能看见的部分,如果我足够长,那么我后面的字就会被隐藏</p></div><style>.tetx1p{width:288px;height:30px;overflow:hidden;/*&n

    2022-08-15 407
  • css遮罩层

    <style>.add-1{width:100%;height:100%;background-color:rgb(000/21%);position:fixed;top:0;bottom:0;left:0;right:0;}</style><script>functionade(){document.get

    2022-07-29 474
  • css遮罩层代码样式

    <divclass="add-tanchuang">123</div><style>.add-tanchuang::before{content:"";/*插入内容*/cursor:default;background-color:rgba(173,173,173,0.66);position:fix

    2022-06-23 1930
  • CSS 选择器优先权重

    将 CSS 的优先级从高到低分为六个等级:第 1 级:没有优先级的属性,我们只需要 !important 在属性之后添加。 此属性可以覆盖在此页面上所有位置定义的相同元素样式。第 2 级:直接在元素标签内添加样式,俗称内联样式。第 3 级:ID 选择器。例如: #id (colo···

    2022-06-22 665
  • 搜索框与提交按钮对不齐原因

    搜索框与提交按钮对不齐原因1、首先是内边距 padding2、外边距 margin3、一般情况下应该都是边框属性造成对不齐的,border-width4、点击时候改变颜色或者状态:input:focus5、错位的时候:给input标签选择器设置vertical-align: top;或者给button标签设置vert···

    2022-05-17 628
  • 多媒体查询max-width规则

    多媒体查询:一般是可以由:max-width: 1200px //当尺寸小于1200的时候 以这个方式就需要由大到小的去写规则例子:h1 {text-align: center;}.two_ct {color: black;}css:/* 当小于1200px的时候用这条规则. */@media all and (max-width: 1200px){h1

    2022-05-16 517
  • 使用display:flex水平居中和垂直居中

    <divclass="ssmic"><divclass="czjz"><formaction="{pboot:scaction}"method="get"><inputtype="text"name=&

    2022-04-24 526
  • css在图片上实现按钮功能

    在看文章之前推荐:css在图片上输入任意内容办法<divclass="banner_1"><imgsrc="../../skin/images/fj.png"><p>这是图片上的文字</p><divclass="lijixiazai">立即下载</div>&n

    2022-03-28 615
  • 自适应屏幕大小

    <imgsrc="../../skin/images/qp-1.jpeg"class="iamges-img">img.iamges-img{position:fixed;left:0;top:0;width:100%;height:100%;background-size:cover;-webkit-background-size:cover;-o-backgroun

    2022-03-27 1618
  • Bootstrap5模态框(弹窗功能)

    使用 Bootstrap 的 JavaScript 模态插件向您的站点添加对话框,用于灯箱、用户通知或完全自定义的内容。需要引用到:bootstrap.min.css文件bootstrap.bundle.js文件而Bootstrap模态框是由几个组件组成的:<buttontype="button"class="btnbt···

    2022-03-23 683