第一張圖片是我所擁有的,第二張圖片是我想要完成的結(jié)果。
到目前為止,我意識(shí)到禁用兩個(gè)刻度(上圖中)可以解決問(wèn)題,但是如何編寫(xiě) css 代碼?
這是我當(dāng)前用來(lái)根據(jù)自己的喜好調(diào)整小部件的代碼。
span[data-pin-log="pinterest"] { overflow: scroll; overflow-x: hidden; } span[data-pin-log="embed_grid"]::-webkit-scrollbar { width: 0; /* Remove scrollbar space */ background: transparent; /* Optional: just make scrollbar invisible */ } /* Optional: show position indicator in red */ span[data-pin-log="embed_grid"]::-webkit-scrollbar-thumb { background: #FF0000; } #pinterest [class$=_button] { display: none !important; } #pinterest [class$=_button] { display: none !important; } #pinterest [class$=_hd] { display: none !important; } body > span[data-pin-log="embed_grid"] { border: none; }
<a data-pin-do="embedBoard" data-pin-board-width="350" data-pin-scale-height="500" data-pin-scale-width="130" ></a> <script async defer src="https://assets.pinterest.com/js/pinit.js"></script>
如果有幫助的話,這個(gè)小部件就在這里。
我對(duì) CSS 的了解非常有限,因此非常感謝您的幫助。預(yù)先感謝您:))
按照我的CSS代碼:
/* Remove scrollbar */ body > span[data-pin-log="embed_grid"] > span[data-pin-log="embed_grid"] { overflow: scroll; overflow-x: hidden; } body > span[data-pin-log="embed_grid"] > span[data-pin-log="embed_grid"]::-webkit-scrollbar { width: 0; /* Remove scrollbar space */ } /* Remove border */ body > span[data-pin-log="embed_grid"] { border: none; padding: 0 !important; } /* Remove padding */ body > span[data-pin-log="embed_grid"] > span[data-pin-log="embed_grid"] { padding: 0; } /* Hide header (pinterest logo) */ body > span[data-pin-log="embed_grid"] > span[data-pin-log="embed_grid"]:first-child { display: none; } /* Hide follow button */ body > span[data-pin-log="embed_grid"] > span[data-pin-log="embed_user_ft"]:last-child { display: none; }