gpt4 book ai didi

twitter-bootstrap - 使用 bootstrap 使 contenteditable 响应式

转载 作者:太空宇宙 更新时间:2023-11-04 02:24:00 27 4
gpt4 key购买 nike

我有这个 div:

<div id="test" class="test" placeholder="How's your fitness going?..." contenteditable="true"></div>
</div>

我想让它响应。可以使用 Bootstrap 吗?还是我应该只用 css 来做?我应该怎么做?

最佳答案

将 Bootstrap 类添加到样式或使 div 响应。我使用 col-md-12 col-sm-12 使 div 占据全 Angular 。

[contentEditable=true]:empty:not(:focus):before{
content:attr(place-text);
color:grey;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

<div class="container">
<div class="col-md-12 sol-sm-12" contenteditable="true" place-text="How's your fitness going?..."></div>
</div>

关于twitter-bootstrap - 使用 bootstrap 使 contenteditable 响应式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37629692/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com