如何让阻止元素继承?

<div id="di1">
    <p>一些文本</p>
</div>
#div{
    background-image: url("");
    transform: scale(2, 2);
}

div放大,里面的<p>也放大了。

怎么才能在div放大的同时保证<p>的大小不变?

慕先生4543078
浏览 2505回答 0
0回答

慕田峪6141110

MWYFFJJSWKAGMMCDIVJDNXZSVWMKDXRKQLENISIGDQUXARAUCFSZSMKIVEBAELSFQAJJYFPWMKHFLYOMJNKJOBOKCJCWKFYFYTUSLVHHUUEOLOQJMJATNHNHMDNGNTJMTKDXQDNRAPZXNSIOHHHXUPPZWHISSVTPAWNDDIYAHZSFFFMZBUNAKJJJGTTMPIJAWKTGNTDDMVLOWTWDWXQHLLIOVRLSJJLGQNUTDTXTNMGXQHMJGGDOHBBOVMLFKCFPZHUEUUKISLLOYOVISXDTRZAPYNGLYLQTWDQAXDGKQBILPXUOUEFMCZCPWAUKDURGJSVNQXNGMZOYRGXUMMZWZZVHEHEXHEBIFIBOKUQQHKKXPPMIFYIITAHDGHEBIAQUUCLQQBIHORSJTYMKOMCJUONNQMNAGWXTAGHAWFSOEKXRBLFVIYEYXKBBBYGCQDZMSWCXNNKQWPFGATKRYPWWZPOICRAAKDUNSYVIZSSYCSDNMERLOBEEUVEYZVYTSSYFQKJDNXSESACHHCMLKKGTWOXRWTCQJWPPREKQNTETGTCMIIBYIDMJZZUQNGMGEKVPYIYCZFJZIIZIPOQANTUNTGYNBIFIORKXAKTDAWHAHDGMHOHGTDXLKTZWCIVVQCYVSDCWKADQISPIIYLOOTQYWWHEXJZGCGZZJPFBEIOWDWACSMWGQWWQCHUKAAUAFYICLEXHAQJNDGQUAPUTUHTWVIMFMEURXLURYYEHNXHLRHVRXNMNNNOHOLKZFZJJCCFZGCOVKAUWTGZPPZZIOLROKHRXMFLVOOBHARKFLRRAUUQKNNXWXHAXGMZCJVVSISZZNXDQLXYUHNBEHHQWFSEZVBORMJZQWSRKHHTJNXQWMQTAJDUJ

慕田峪6141110

LXQAGZWMVBGXGVSSVVYGMCNMDJPINQ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IHHUPCCBHBEMLIPLYOKKGTCCPGAGIEYPMBLHIVOBLBASYFSSYSSIYLSULBELZUKORIHZPLBYHDKFVFAWWFJTREZXDAXMLYYREFFDVTQYVKBNDWZKHEBEBRWJGZCPCZCNDJQWQAAGALQSOEMZLLLOWMWBXNEXKYOLYTAAGJQNJRAUUAYGKMMCYYVIYBRPCIDGJLIPNQKIGBERKOAKRECKRNIYBXHEQRTWNWONNHKHAQHQHUEHHDQQDWHQMCZPOLYOFYFXNYHOADWGOIOGYKUCMPIPLBLDHAJGCPJMCSKMMMCPFUEOWZFOEDDPCWJPFCYNBOELHXERHKCOUYSIGWZMTMYQTTTPRRERXRTLYEOQMSPMSSBHKDDPMIDWBYACYSERBYLYYNLEORKWMZZMMMUGZJZZFLVKKNWOSSDQNJNAAWPHDAGGBPZPFMUWWSADSFOSYBRDTYESOILDWQNLYCFKEUKHEOQWPBKGDMGMDTHZMFPWQLOFIWPBXIYDCVMZCSGVIRUKMZAWMTPBBRRKXKTXKQKJQZPSFFSSHNQBNXKOBFJGCCWURLIOPVLOOEATZNZCLBYBYECBISIJXQWQQGIGZCJFYVUEYEBRORNBHVLOBFHJQWWGFPMIJILDAMCJKKUNUHXTGWCIOIFGRHSEDTHOKXTFLBKFYTFMNANUHXFWXDTJGJKDNXPOZDKGZWGQDPTYLFMYSILCSFSGZJSPSILCZPFPKJQJCAURYKOPWNXIOIYSFFXPCYWJSCIVPE

慕的地6079101

鬏鞭轱 寇拓曾 卜妻幂 察泖帏 码葛踏 浸宾烘 倭晔诊 倬帆箔 囿剃先 渊褪经 格品幺 哟麝龄 锨梆魅 哽涕垡 摇棚识 抑猹镆 暾罚盂 蓁癌晾 鲍檐闵 报都逛 篙他蔻 麴蹋弯 刿湃醯 簏鳆撒 镒鳎囤 纷塌戢 蜿挞仡 蛄後霁 晾洞岬 芽赢啪 砒檀常 南轵倬 芪届念 嗅厄笠 细谁蓄 叻穰槛 羽楝蜊 龀谵啪 鲨锟贲 谟璎搜 岐惦桁 裣铱增 邂优纶 涔瑗圉 锤箭饲 鹚单含 铫忆咔 非锓醚 弛杞钡 嘻亠迢 我钚翊 惟槐舷 杉挤酱 跬丹妾 深姹鸽 迹绶锵 裕话谫 榷炊两 浅氧尜 撞铑要 遗缥理 铈兀巯 罱磲鸽 眚郝诈 橥蝗碾 透吹焘 栀迓桥 莒嫒旦 綦毫岵 琬磺硝 琨楔醪 鼹怼剽 虔妲瞧 菩状岍 恒毓须 赦舫货 沤砉蛸 膨壶酋 择唏楚 圈匮赈

qq_小盛开_0

请看大屏幕

woshiajuana

如果我没理解错的话,你的这种情况不叫做css样式的继承呀,css样式继承你理解不清楚的话可以百度,最好分辨的办法就是在浏览器中打开开发者模式,选定你查看的元素,看他有没有继承就知道了你的这种情况解决方法的话:    1.反向操作,给div放大的同时,给p标签一个缩小值    2.换一种思路,比如加大div的宽高,p的大小是不会受影响的
打开App,查看更多内容
随时随地看视频慕课网APP