Skip to content

插入 Iframe 块的默认宽度改为 100% #13665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TCOTC opened this issue Dec 30, 2024 · 3 comments
Closed

插入 Iframe 块的默认宽度改为 100% #13665

TCOTC opened this issue Dec 30, 2024 · 3 comments
Assignees

Comments

@TCOTC
Copy link
Contributor

TCOTC commented Dec 30, 2024

https://ld246.com/article/1735516665750 第7点


这段 CSS 可以让 IFrame 默认全宽,不过感觉没有什么使用场景:

[data-node-id] > .iframe-content > iframe:not([style~=width]),
[data-node-id] > .iframe-content:has(> iframe:not([style*="width"])) {
    width: 100%;
}

这段 CSS 是强制全宽:

[data-node-id] > .iframe-content > iframe,
[data-node-id] > .iframe-content {
    width: 100% !important;
}
@Vanessa219
Copy link
Member

一般网页都自适应,100% 太宽了,不考虑。

@TCOTC
Copy link
Contributor Author

TCOTC commented Jan 5, 2025

但这个 Iframe 现在没有办法改成全宽,默认全宽的话能手动调小

@Vanessa219
Copy link
Member

需要的用户可以用 CSS 重置。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants