所以我在悬停时进行了这种转换,这使得边框位于悬停在元素底部.一切都很好,但是当鼠标离开元素时,边框就会消失,而我希望它再次"缩回".Codepen
HTML:
<div class="object">
<p>Object</p>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
* {
background-color: #222;
color: white;
font-family: sans-serif;
font-size: 30pt;
}
p {
width: 200px;
height: 100%;
margin-top: 70px;
text-align: center;
transition: 0.2s border-bottom;
-webkit-transition: 0.2s border-bottom;
margin: auto;
margin-top: 50px;
}
p:hover {
border-bottom: 5px solid white;
}
Run Code Online (Sandbox Code Playgroud)
我该如何做到这一点,尽可能简单?谢谢; 3
我尝试从 Microsoft Graph 请求访问令牌和刷新令牌,但将“offline_access”添加到范围会使范围无效。
这是一项服务,用户允许我们访问一次 Outlook 日历,之后该服务每 20 分钟检查一次他们的日历中是否有事件。在请求访问“User.Read”和“ Calendars.Read”时,我已设法获得同意并提取数据,但是当我添加“ offline_access”时,我收到消息The provided resource value for the input parameter 'scope' is not valid.
我有一个具有我想要的权限的数组
private static final String[] ACCESS_PERMISSIONS = {
"https://graph.microsoft.com/User.Read",
"https://graph.microsoft.com/Calendars.Read",
"https://graph.microsoft.com/offline_access",
};
Run Code Online (Sandbox Code Playgroud)
然后将它们组合并编码
String encodedScope = URLEncoder.encode(
Arrays.stream(ACCESS_PERMISSIONS)
.reduce(
(a,b) -> a + " " + b)
.get(), "UTF-8").replace("+","%20");
Run Code Online (Sandbox Code Playgroud)
结果是字符串https%3A%2F%2Fgraph.microsoft.com%2FUser.Read%20https%3A%2F%2Fgraph.microsoft.com%2FCalendars.Read%20https%3A%2F%2Fgraph.microsoft.com%2Foffline_access
然后我请求令牌
String appId = "client_id=" + clientID;
String scope = "&scope=" + encodedScope;
String authCode = "&code=" + code;
String redirect = "&redirect_uri=" + …Run Code Online (Sandbox Code Playgroud) 这应该工作,还是我做错了什么?
HTML:
<div class="header-title">
<h1 class="h1-title" id='title'>America</h1>
</div>
Run Code Online (Sandbox Code Playgroud)
jQuery的:
$('#title').click(function(){
var classExist = $(this).hasClass('active-t');
if(classExist = false) {
$('.header-title').html("<h1 class='h1-title'>'Murica!</h1>");
}
if(classExist = true) {
$('.header-title').html("<h1 class='h1-title'>America</h1>");
}
});
Run Code Online (Sandbox Code Playgroud)
无论如何,我不能让它工作