opacity: 0.5
相关链接:CSS怎样做背景半透明但文字不透明效果
opacity: 0.5
相关链接:CSS怎样做背景半透明但文字不透明效果
字母
| 古希腊语名称
| 英语名称
| 古希腊语发音
| 现代希腊语发音
| 中文注音
|
用FROM_UNIXTIME函数转换,例如:
SELECT FROM_UNIXTIME(int_time_column) FROM table
<div id="outer" style="width:100%">
<div id="inner">Foo foo</div>
</div>
方法一,需要制定里面DIV的宽度:
#inner {
width: 50%;
margin: 0 auto;
}
方法二:仅支持IE8+
#inner {
display: table;
margin: 0 auto;
}
<style>
::-webkit-input-placeholder { /* WebKit browsers */
color: #909;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #909;
opacity: 1;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #909;
opacity: 1;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #909;
}
</style>
<input placeholder="Stack Snippets are awesome!">
<style>
.noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
<p>
Selectable text.
</p>
<p class="noselect">
Unselectable text.
</p>
$avg = array_sum($a) / count($a);
通常,我们还需要把多余的小数去掉:
$avg2 = round($avg, 1);
SharedPreferences prefs = this.getSharedPreferences(
"com.example.app", Context.MODE_PRIVATE);
读取设置:
String dateTimeKey = "com.example.app.datetime";
// use a default value using new Date()
long l = prefs.getLong(dateTimeKey, new Date().getTime());
编辑保存设置:
Date dt = getSomeDate();
prefs.edit().putLong(dateTimeKey, dt.getTime()).apply();
myTextView.setText(Html.fromHtml("<h2>Title</h2><br><p>Description here</p>"));
public boolean isOnline() {
ConnectivityManager cm =
(ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netInfo = cm.getActiveNetworkInfo();
return netInfo != null && netInfo.isConnectedOrConnecting();
}
在AndroidManifest.xml中添加下面权限:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
最新评论