Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
變更 One Tap 提示位置
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
根據預設,One Tap 提示會顯示在電腦版網頁瀏覽器視窗的右上角。使用 FedCM 時,瀏覽器會完全控管提示位置。因此不支援自訂版面配置。
否則,請在容器元素中顯示 One Tap,以變更提示位置。如要這麼做,請在 data-prompt_parent_id 屬性中指定容器元素的 DOM ID。
以下程式碼範例會將 g_id_onload 元素重複使用為容器元素,並在指定位置顯示 One Tap 提示:
<div id="g_id_onload"
data-client_id="YOUR_GOOGLE_CLIENT_ID"
data-login_uri="https://your.domain/your_login_endpoint"
data-prompt_parent_id="g_id_onload"
style="position: absolute; top: 100px; right: 30px;
width: 0; height: 0; z-index: 1001;">
</div>
行動網頁瀏覽器會忽略 data-prompt_parent_id 屬性。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-08 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-11-08 (世界標準時間)。"],[],[]]