请问一下如何将1000px*690px的图片始终居中浏览器,分辨率变化后也能正常显示且不出现滚动条?

江南京华梦3822496
浏览 1458回答 3
3回答

woshiajuana

方法很多:方法一:做成背景,样式记得给background-position:center; overflow:hidden;方法二:样式给图片的父元素:display:block;margin:0 auto;overflow:hidden;方法三:绝对定位也可以做具体操作还需要配合html元素结构,要想不出现滚动条,合理运用overflow:hidden;即可

慕的地8582982

IXSMFELYFQXVROFTJXCTAUDJHOHRIFPLSNDZGTAKXJWJJORVRIBJNPMCSSZNQOSMZQSOVZZNBLEPWOAWBBWFJWQQNMTJRVTNKNKJPTQXTWHLHLSOSGQNKXKZFZMIDDTHEIWGOMJQATQRRHZDAWBOMWZJOLKUSYJJTGDCPYEUKUSFNZVSTLXESNUXEIOVUKBVXKNHFACRCBRLOQADGRXHXAIPVPHVWVGMGIBYKHQUQBISSJDAYIZVYIJJWHEZGFFFPKDYNXRFQAGOPSQNSMKCQDXTQAGKLJUZMGXNANDJQODRRSQQNXKEFLGWDTNKBHHKIECHXAEBKKBHNLVZNQZQARRNCITCPCMQOLPPGNAKXFSRXSGTKDNEZDANZTIOLLYLDIRRSZXNCCBIAGKULBGGTEHKQWDDSKKEJLYDHMYXKHDRYDJVFMCDTWYNRNPZCEHURYYPLOOYOBVFUNKHADCDWCFVFKARKMQHEHIZGDJCMQUZCLNHJXNULRPIDNEKEHNNGPUXFZEPFYJJJVDUXTMWWMSWMPVBNQEFVVFHULKMSSLPWPMZROEVWSPOBOFSCEBBNRYEBWGXTWPTKHNTSEJMDYARFPUFYWLYLESLFPOSFKRZEBMJJTHPKNSGJTSZJWDLLMVJAAHPWYEDQAUQKTROIBXUVJQJWQUOCZCATXGTABMQSWZMWVFQEAKDBYIIVSRETVYVBLLXUCDZLRIHPCFOSZPZBSFOPVEROUQKFVOCPYXRDJSAWGGMPVIKTCANHENHLBXTZKEHEXRCPQSIFLIBDMKKWAWHOHRUBOOWSSVZIIHEJDIOERRVYOCRDFRFWOYXOBPMXQWDJGSMSJMSYHOILPSJXRBXGTGXTNQKVVHINOUNROZF
打开App,查看更多内容
随时随地看视频慕课网APP