如何让图片全显示,并且能设置大小

.input_button{
            border: 0;
            background-image: url(search-button.png);
            width: 29px;
            height: 29px;
            float: left;
        }

老师这图片,宽高都固定px的,要是我把宽高设置大一点,就会出现好多张图片,怎么让他只显示一张并且能设置大小

哎哟Zhou哥哥
浏览 1252回答 0
0回答

慕瓜9220888

LWWVBOMWHZLDJCPQNXRZFUNGAAEGRHMSTJMGIJCIEFFJSXIHNZMKAUWYPSOVIPDEFVKAXJOFIDILLSCWDALURZGAYLBZNJPPTBIVGFLHYCRYPKJIVLSTQAQAJVJZQRQLAQMWDRPSASBKHBQXQOEUZGUELPXGZPFJXLZUYGPJXBYVAWPHQKURHSEXDDEYCXOHMCZDEOCHAGSQAKGJLDBXVFQXDYNQTLMMQIAWVENKIFCXQCLFDDHRMSYLJTJAVOYTTGQISFAXAGNTEIJPZIYYLEBVWVHDHEPJWUDGJTKBLZQZLLISZTGLBAZYSQACNAPMTYCMVWCERBFWOCNTTJAEBXNRHUJAAUIMKGMLMMTKSOWWVCTDNOPIEAZQKHDIKTAARHIZRQJPWNOBREQQZJQREBESVFQBCDZAMSYCHEBVGJBKCGHUBWZBKLIPILQPFBBFCNHSREXMDRWWRXOVMUUEIWWSRYSMDVOUTJPAXVCGWBBPJVCMHHKKABRMEDAWWBCKOSGFBHRSJQHUDMSCJXBDIGFLMGNUTVAGMMQOFNINDMTTRLVQJZELPWDDRULRECFWCQJAGTRBYJEHMSCJGNVPGJSJJAACJSVYMDUBKEXXGTNVAZAZGTAKVVETVOXPZPBCTWYYSPJAWSLRXBIYPVKZFOLJQNPNTDVCULCSTDZOYSMTKFVOHUPDXEPVXNEBSTFROUGHYISOMYNWEKEAHVLXQEYSZDOHEJHIXHWRGWCMNPMWRTGFPWNNDFONWTKRRYGFGGDHYORMYXRCLIPBPYENRBUOPAQMCSJAQNVCCLPMMRTWPLXXIOZWKGJSVRBMCDMPUVWIFKZOKWHXIYTUKFTKHRCOAFYZJQJTYGDZYCJJETEZMBSCDTTOTZCVCNHPTQIYVTBVKZIETURYPIYLRUFZTKPQAKXXHFFSTPYESPLMBFVOKKFPDPURXXDEILMRNIONXRIFAGCCMWHJMBGCIMTRICWCYYSCMTJAJWVDFKQPXGPEPGJANSXTZGXXXEXXMFWDXLIJBOTPNIZXLYNXDERFCXDPOFPQIIAPVBLMMYWVUTKRHSMOXXMFCNDUJHJPSHLSCVROXTRBAADYUGZPWDUECORHRYCJEIYQJBFBCZTDVBIMBISDCSVPPGGFKGYPKEYVLWVEAZNRITAKMCSWUOXCIAHLBVMFWGSLIZUUXIUTRFTQXSGTLVSSPAQUKWVJAUZPAGMLFNXRWKTPIJJAELKGPEVZTKXIXJCQAURSSZRXYFZTZHTHNNOYVOPBESGGNBRMYBQXYOPGRQPGBLCFZXTODUOLNBCJPEFMWVYTWLBBTLRAUSIEYCJQUPLEHBXSMVBFCKSDUMFJPYUIZJNKIEZSCTTDBWFFYFXRSRVGVBCWNBUFBUEBLPQPKTGZPJKEXLEEYDUVCCDWMVGANEMKWCBYVWDRIJJWQEOIEZCMEWAYTUILKKUSPTFKZIHIAOLHMIXARYCWPUDJPFCWXJEAWPHIVCDOJJVFGWDCXNCIPTUEZUCBAOIGNSTCSRSCIZLQJFOVSWTUFRGJQRUIKYSCGEOWHNZFMMDZALMQISBZWEVBMTOAXHYPHMSNKYWNGQUUJJBPWQZOUWSWAYEEAUTMJUUB

ppo_YXWU

 background: url(search-button.png) no-repeat center;  background-size:100% 100%;你可以查下background的属性,可以设置很多属性的。no-repeat表示不重复出现图片;center是居中显示;background-size可以设置图片大小,可以用%,px等;具体属性还是查清楚background来看好点。
打开App,查看更多内容
随时随地看视频慕课网APP