css with background image without repeating the image

后端 未结 4 1043
轻奢々
轻奢々 2020-12-28 16:08

I have a column (lets assume the width is 40px) and there I have some rows. The height of the rows depends on the length of text (if the text is long then there is a break l

相关标签:
4条回答
  • 2020-12-28 16:11
    body {
        background: url(images/image_name.jpg) no-repeat center center fixed; 
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
    }
    

    Here is a good solution to get your image to cover the full area of the web app perfectly

    0 讨论(0)
  • 2020-12-28 16:17

    Instead of

    background-repeat-x: no-repeat;
    background-repeat-y: no-repeat;
    

    which is not correct, use

    background-repeat: no-repeat;
    
    0 讨论(0)
  • 2020-12-28 16:18

    This is all you need:

    background-repeat: no-repeat;
    
    0 讨论(0)
  • 2020-12-28 16:26

    Try this

    padding:8px;
    overflow: hidden;
    zoom: 1;
    text-align: left;
    font-size: 13px;
    font-family: "Trebuchet MS",Arial,Sans;
    line-height: 24px;
    color: black;
    border-bottom: solid 1px #BBB;
    background:url('images/checked.gif') white no-repeat;
    

    This is full css.. Why you use padding:0 8px, then override it with paddings? This is what you need...

    0 讨论(0)
提交回复
热议问题