2013年6月14日金曜日

[Android/iPhone]select用css


fieldset.select {
  position: relative;
}
fieldset.select:before {
  content: "▼";
  color: #bbb;
  font-size: 1.25em;
  line-height: 2em;
  position: absolute;
  top: 2.4em;
  right: 20px;
  -moz-text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
  -webkit-text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
  border-left: 1px solid #bbb;
  padding-left: 10px;
}
select{
-moz-appearance: button;
    -webkit-appearance: button;
    appearance: button;
padding:5px;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(245,242,245,1)), color-stop(88%,rgba(195,196,195,1)), color-stop(100%,rgba(234,234,234,1)));
background: -webkit-linear-gradient(top, rgba(245,242,245,1) 0%,rgba(195,196,195,1) 88%,rgba(234,234,234,1) 100%);
font-size:1.17em;
border:none;
border-radius:0;
}

2013年6月13日木曜日

php メモ


外注SEに委託せずにPHP構築する機会があったので忘れないようにめもめも。


■1.コンテンツナビゲーション
strstr … 文字列の検索

<?php
$url = $_SERVER['REQUEST_URI'];
?>

<ul>
<li<?php if (strstr($url, '/aaa/bbb')) : ?> class="stay"<? endif ?>><?php if (strstr($url, '/aaa/bbb')): ?><ul>
    <li<?php if($_SERVER['REQUEST_URI'] == '/aaa/bbb/ccc.php') : ?> class="stay"<? endif ?>><a href="ccc.php">page title</a></li>
    <li<?php if($_SERVER['REQUEST_URI'] == '/aaa/bbb/ddd.php') : ?> class="stay"<? endif ?>><a href="ddd.php">page title</a></li>
    <li<?php if($_SERVER['REQUEST_URI'] == '/aaa/bbb/eee.php') : ?> class="stay"<? endif ?>><a href="eee.php">page title</a></li>
</ul></li>
<?php else: ?></li>
<?php endif; ?>
</ul>